The Allcora CLI is a small program that starts Claude Code for you, tagged with the engagement's job code. It checks the engagement's budget before the session starts and reports usage and cost as you work. Allcora stores only per-request usage and cost. The CLI doesn't switch on Claude Code's prompt logging; make sure OTEL_LOG_USER_PROMPTS isn't set in your own environment. Any other Claude Code telemetry it receives is discarded.
Before you start
An Org admin connects Claude Code once, on the Usage sources page. This creates an ingestion key, shown once, which each developer needs. Share it through your password manager, not by email. When someone who had the key leaves, create a new key under Usage sources, share it with the team and revoke the old one. Each developer needs Node.js 20 or later and Claude Code already installed.
Adding an Anthropic Admin API key to the Claude Code source is optional. With it, Allcora reconciles each person's daily Claude Code cost against Claude Code's own analytics, which also picks up use that didn't go through the CLI. See Unattributed spend.
Set up the CLI
- Download it. In a terminal, in a folder you keep tools in:
curl -O https://app.allcora.ai/cli/allcora.mjs - Make it easy to call. Add an alias to your shell profile (for example
~/.zshrc), using the folder you downloaded it to:alias allcora="node ~/tools/allcora.mjs" - Save your key.
The key is checked and saved toallcora login --key alc_live_YOUR_KEY~/.config/allcora/config.json, readable only by you. - Check the connection.
allcora doctor
Work on an engagement
Use the engagement's job code, shown on the engagement page:
allcora run -e NW-101
The CLI shows the engagement and how much of its budget is used, then opens Claude Code as usual. To pass options to Claude Code, give the full command after --, for example allcora run -e NW-101 -- claude --continue.
If you spend a while on one engagement, set it as your default with allcora use NW-101 and then just run allcora run. allcora status shows the budget position without starting a session.
Use Claude Code with an API key rather than a Claude account? Add --email you@yourfirm.com so the usage is linked to you. Without it, when the Claude Code source reconciles against analytics, those sessions' cost moves off the engagement to the unattributed total.
When the CLI won't start a session
The budget is checked once, when the session starts. The CLI refuses to start when:
- the engagement is paused, closed or still a draft ("Engagement is paused"), or
- the engagement has passed its limit and has a hard gate ("Budget limit reached. Ask the engagement owner to approve more budget in Allcora.").
With a soft gate, the session starts with a warning that the engagement is over its limit and the owner has been told. A session already running is never stopped. See Alerts, approvals and stops.
If Allcora can't be reached, the CLI starts the session anyway and the usage is still recorded. To refuse instead, add --fail-closed.
Claude Code used without the CLI
Sessions started directly with claude aren't tagged to an engagement, and without the optional Admin API key they aren't recorded in Allcora at all. With the key, each person's Claude Code cost for the day, as Claude Code's analytics report it, is shared across the engagements they ran through the CLI that day, in proportion to that use. If they ran nothing through the CLI that day, the cost is added to the unattributed total as a daily figure. It can't be assigned item by item, so the reliable fix is to start every session with allcora run.
Settings for teams
The environment variables ALLCORA_KEY, ALLCORA_ENGAGEMENT and ALLCORA_ENDPOINT override the saved settings, which suits shared machines and scripts. allcora version prints the CLI version.
Last reviewed 29 October 2026, Allcora platform version 15.