Local development
hcc dev (the @hcc/cli package) connects the test environment to your machine, like stripe listen --forward-to. Test flow events reach localhost, with no public URL, no ngrok and no endpoint to change. With an hcc.config.ts, every save deploys what changed to test.
pnpm dlx @hcc/cli dev --forward-to http://localhost:8790/hcc -- wrangler dev --port 8790✓ Dev session ds_8f2… attached (test environment, workspace Acme)
Flow events → http://localhost:8790/hcc · Webhooks → not forwarded
12:04:31 call_9x… ringing +14155550100 → +12025550107
12:04:31 → call.answered 200 38 ms say "Thanks for calling.", gather 1 digit
12:04:35 ← caller: Pressed 1
12:04:35 → call.gather 200 21 ms connect assistant
12:04:52 ✓ call_9x… completed 21 s
12:04:52 ← call.completed delivered 200 12 ms- Your code runs unchanged: events carry the same envelope and
Hcc-Signature(the test endpoint's secret) and the same budget, so your server verifies them as usual. Timeouts and errors take the same fallbacks. - It uses a test key only:
--api-key, elseHCC_TEST_API_KEY/HCC_API_KEYfrom the environment,.dev.varsor.env. A live key is refused; the key is never printed. --forward-toand--webhooks-tomust belocalhost,127.0.0.1or[::1].- On save it scans in a fresh process, keeps
hcc.gen.tscurrent, and deploys only what changed, to test only. A file that fails to load is printed, and the last good version stays.--no-synckeeps the generated file current and deploys nothing. - Agent tools. A save syncs tools only to test branches, because the tools on a shared agent's main are the ones live calls use.
--sync-toolssyncs to every agent. It tells you when tools changed and weren't synced. -- <command>runs your server too: its output prefixedapp │, started oncehcc.gen.tsexists, stopped whenhcc devstops. Separate terminals work as well.- Webhooks. Pass
--webhooks-toto get a copy of every test Event, signed with a secret printed at startup: set it asHCC_WEBHOOK_SECRETforhcc.webhooks.verify. Without it, copies aren't forwarded and each type prints once. Registered webhook endpoints still get their deliveries. - Without an
hcc.config.ts, the flows that run are the ones deployed to test (a test key, oralsoTest: true). Place calls from the dashboard's Simulator or withhcc.simulator; their timeline prints in the terminal. - One dev session per workspace: a second
hcc devtakes over the first. The dashboard's Flows and Simulator pages show who is attached; owners and admins can detach it. Ctrl+C detaches.