Skip to content

Hecaton CLI

Use the hecaton command to drive Hecaton from a terminal or a CI job. The npm package is @hecaton-io/cli and requires Node.js 24.

Connect

Install from npm when the package is available. Replace <version> with the published version you want to use.

Shell
npm install --global '@hecaton-io/cli@<version>'

On your computer, run hecaton login and approve Drive workspaces in your browser. hecaton logout revokes the login on this computer and removes its local credentials. You can also revoke access in Settings → Connected tools.

On a machine without a browser, store an API token in HECATON_TOKEN, or supply it on standard input with --token-stdin. The CLI tries standard input when requested, then the environment, then the local login. Keep credentials out of arguments and logs. The default origin is https://api.hecaton.io. Set HECATON_API_ORIGIN to an HTTPS origin without /v1 for another environment.

Commands

CommandActions
hecaton workspacecreate, list, get, send, messages, turn, results, sleep, wake, archive
hecaton questionlist, answer
hecaton projectlist
hecaton joblist, create, get, update, delete, runs, pause, resume, run
hecaton webhooklist, create, get, update, delete, rotate-secret, test, deliveries, redeliver
hecaton events <workspace-id>Stream workspace events, optionally from --last-event-id <id>
hecaton me, hecaton openapiRead the calling identity or the anonymous API contract

Run hecaton <command> --help for arguments and options. Paginated commands accept --limit and --cursor. Commands that take a JSON body accept --body-file <path> or --body-file - if standard input is free. See the API reference for bodies and required permissions. Commands that require an idempotency key generate one automatically. Pass --idempotency-key <key> to reuse it across calls. Use --yes for an authorized archive from a script.

JSON output and exit codes

The CLI emits JSON when standard output is redirected or when you pass --json. A stream emits one JSON object per line. With --wait, workspace creation and send print the admission first, then events. A successful creation with --wait ends with the result document. Errors in JSON mode include code, message and requestId (which can be null).

Exit codeMeaning
0The command succeeded or the requested turn completed.
1Command or API error.
2Invalid usage or missing archive confirmation.
3Missing or invalid authentication, or insufficient permissions.
4An agent question is pending.
5The turn failed or was stopped.
124The deadline expired.

--wait defaults to 1,800 seconds. Override it with --timeout <seconds>. You can also bound hecaton events with that flag. After a timeout, use the workspace ID to read its state or resume events. The CLI's timeout stops the wait on your machine, and the workspace continues its work.

See examples in GitHub Actions, GitLab CI and Local agent.