@hitl-sh/cli
v0.4.2
Published
HITL (Human In The Loop) command line: add a human to any agent from the terminal, run the HITL MCP server, and edit workflows live with Claude Code
Maintainers
Readme
hitl puts a person in the middle of your script. It starts a HITL workflow, a reviewer
answers on their phone, in the web inbox or in Telegram, and the command exits with their answer.
Get started
npm i -g @hitl-sh/cli
hitl login --api-key hitl_live_… # key from https://my.hitl.sh/settings
hitl workflows list
hitl run <workflow-id> --input '{"amount": 1200}' --watchNo account yet? An agent can get a key with its human's email, no browser needed:
hitl signup --email [email protected], then hitl signup confirm <code>.
Run a workflow and wait for the answer
Progress goes to stderr and the result to stdout, so answer=$(hitl run … --watch) just works.
| Exit code | Meaning |
|---|---|
| 0 | The run completed |
| 2 | It failed or timed out |
| 5 | Still waiting when --wait ran out (hitl executions watch <id> picks it up again) |
| 3 | No API key, or the key was rejected |
See your workflows and runs
Connect Claude, Cursor or any MCP client
hitl init claude-code # or: claude-desktop, cursor, or no argument for the JSON snippetThis adds the HITL MCP server (@hitl-sh/mcp) with your key.
hitl mcp runs the same server over stdio.
Everything else
| To | Run |
|---|---|
| See what a workflow reads | hitl workflows input <id> |
| Build one from JSON | hitl workflows create --file refund.json, then hitl workflows activate <id> |
| Invite reviewers | hitl workflows invite <id> --emails [email protected] |
| Share a join code | hitl workflows join-code create <id> |
| Fire a webhook trigger | hitl trigger <webhook-id> --data '{"order": 1234}' |
| Run a failed run again | hitl executions retry <workflow-id> <execution-id> |
| Edit with the HITL editor live | hitl workflow '<link from Connect Claude>' |
--help works on every command and --json prints machine-readable output.
Configuration
HITL_API_KEYwins over the key saved byhitl login(~/.config/hitl/config.json, mode 0600).HITL_API_BASEdefaults tohttps://api.hitl.sh/v1. The key is only ever sent tohitl.shhosts.
Node 20 or newer · Docs · MIT
