CLI
hcc is in the @hcc/cli package, and runs on Node.
npm install --save-dev @hcc/cliRun hcc --help to see this list in your terminal.
hcc deploy
Scans your exports and deploys them: to test, or with --live to live and test. It writes hcc.gen.ts and .hcc/versions. Commit both.
| Option | What it does |
|---|---|
--live | Deploy to live and to test. Needs a live key (the Deploy preset). Also removes frozen versions no call uses |
--no-test | With --live: live only |
--check | Write nothing and change nothing. Exits 1 if anything differs, or a frozen version is missing. For CI |
--api-key <key> | Default: HCC_TEST_API_KEY or HCC_API_KEY (with --live: HCC_API_KEY) from the environment, .dev.vars or .env |
--api-url <url> | The HCC API. Default: HCC_API_URL, else the hosted API |
--config <path> | Default: hcc.config.ts in this folder |
hcc dev
Attaches a dev session, so the test environment's flow events reach your machine. With an hcc.config.ts, it also deploys to test on every save. See Local development.
hcc dev --forward-to http://localhost:8790/hcc -- wrangler dev --port 8790| Option | What it does |
|---|---|
--forward-to <url> | Where your server listens (localhost only) |
--webhooks-to <url> | Where your webhook handler listens (localhost only). Without it, copies are printed instead |
--api-key <key> | A test key. Default: HCC_TEST_API_KEY or HCC_API_KEY from the environment, .dev.vars or .env |
--api-url <url> | The HCC API. Default: HCC_API_URL, else the hosted API |
--no-sync | Don't deploy on save. hcc.gen.ts still follows your code |
--sync-tools | On save, also sync tools to agents that aren't test branches. Live calls use those tools |
--config <path> | Default: hcc.config.ts in this folder |
-- <command> | Run your server too. It stops when hcc dev does |
hcc generate
Writes hcc.gen.ts and the current .hcc/versions, with no key and no network. Takes --config <path>.
hcc prune
Removes the .hcc/versions that no call and no active version needs. Commit the result. It needs a live key, and deploys nothing. See During a deploy.
In CI
hcc deploy --check # fails if the commit is missing what a deploy would write
# ship your server, then:
hcc deploy --liveUse a key with the Deploy preset. See API keys and scopes.