[Go to site: main page, start]

Skip to content

CLI Usage ​

Use a small loop: confirm context, inspect existing work, make one change, then check its result. The quickstart covers installation and your first run.

Review permissions to distinguish the permission mode from folder trust and local tool availability before starting autonomous work.

Check context before changing anything ​

bash
chainabit auth whoami
chainabit workspace list
chainabit workspace current
chainabit chain list

workspace current reports the resolved local selection. Listing workspaces checks what the authenticated account can actually access. See configuration if an environment override selects another ID.

Create and run a workflow ​

bash
chainabit chain create --title "Release notes" \
  --instructions "Read the approved release artifacts, draft release notes, and save the result."

Inspect the returned record, then use its ID to start execution:

bash
CHAIN_ID='<created-chain-id>'
chainabit chain trigger-run "$CHAIN_ID"
chainabit chain provenance "$CHAIN_ID" --kind artifact

Creation can involve a model-backed assessment. Triggering starts execution and can consume credits. Inspect errors and resulting records before repeating either command.

For supported mutations, the CLI reuses one idempotency identity during its own automatic transport retries. A later invocation is a new operation.

Install a composed workflow ​

Inspect a template before installing it. Replace the placeholders with a template ID and an agent ID accessible in your workspace:

bash
TEMPLATE_ID='<template-id>'
AGENT_ID='<accessible-agent-id>'
chainabit chain template get "$TEMPLATE_ID"

Bind every Bit slot to an agent exactly once. For a template containing two slots:

bash
chainabit chain template install "$TEMPLATE_ID" \
  --bind-agent 0="$AGENT_ID" \
  --bind-agent 1="$AGENT_ID"

Use the actual slot count and indexes returned by your template.

Create files on your computer from a conversation ​

In a folder you trust, local tools let Chao create a PDF on your computer while Chainabit does the reasoning. Ask for it in the conversation, for example Create a PDF about AI engineering now.

  • The CLI renders the PDF on your machine and saves it in the current folder. Each program step asks for your approval as your permission mode requires.
  • The file is checked before anything is reported: it must exist, be a real, non-empty PDF and match what was rendered. Only then does the conversation show a Saved on this computer card with the file name, format, size, page count, full path and the commands to open the file or reveal it in its folder.
  • Nothing is uploaded. A local file stays on your computer unless you publish it yourself with chainabit artifact publish.
  • Ask Where is my PDF? at any time, also after restarting the CLI. The answer comes from the saved record of the file, not from the model's memory.
  • An existing file is never replaced. A format that cannot be created here, such as DOCX, is refused with a message instead of being saved as something else.

The same files are available from the command line:

bash
chainabit artifact local list
REQUEST_ID='<request-id-from-the-list>'
chainabit artifact local inspect "$REQUEST_ID"
chainabit artifact local open "$REQUEST_ID"
chainabit artifact local reveal "$REQUEST_ID"

inspect, open and reveal check the file again before they report or open it. PDFs are plain text on A4 pages, up to 16 pages. They carry Latin letters including Turkish (ç ğ ı İ ö ş ü) and other accented Latin, Greek, Cyrillic and Arabic, using fonts bundled with the CLI. Other scripts, such as Hebrew, Chinese, Japanese and Korean, and emoji are refused rather than replaced, and no PDF is saved.

When a reply is interrupted ​

In the interactive conversation, an interrupted reply reconnects by itself, also when you resume the conversation later. A message that was never delivered is listed in /queue, where you can retry it once, as it was written, or withdraw it.

See your plan, limits and credits ​

/usage is the one place in the conversation for your plan, your usage limits and your wallet credits. It shows the plan and its status, and for the five-hour and weekly limits how much is used and left, and when each resets. The separate /balance and /subscription commands no longer exist; use /usage. Outside the conversation, chainabit wallet usage and chainabit wallet balance read the same figures.

Alerts above the message box ​

While you work, the CLI also watches your usage and puts an alert above the message box when something needs your attention. It is a free read, never a model call.

AlertWhen
5-hour limit, Weekly limitAt 75% used (25% left or less) as a caution, and at 95% used or when the limit is reached as critical. For example 5-hour limit: 80% used, 20% left · resets in 2 hours, Nov 8, 11:40 PM.
Credits running low, Credits used upWhen your wallet credits run low or are gone, with the exact balance.
Your plan allowance is running low, Your plan allowance is used up for nowWhen a plan allowance pays for your usage and it runs low or is spent. It shows no figure.

Every figure and reset time is the server's own; the countdown uses the server's clock, and nothing is estimated. The CLI reads usage every few minutes while it is open and after a message settles, and backs off while you are offline. Alerts then say not updated since the time of the last successful read. An alert you dismiss returns only when it gets more serious or counts towards a new reset, and it disappears when the window resets. The Usage action on an alert opens /usage.

Script with results you can check ​

Add --json for structured output and inspect the command's exit status. A JSON response alone does not prove asynchronous work completed.

chao returns a nonzero exit code when its run ends as failed or cancelled, while preserving terminal output and JSON. A funding pause is a failed run. Check the terminal status before reporting success.

For unattended credentials and a pipeline example, see Run in CI.

Built with purpose. chainabit.com