CLI Quickstart
Start by confirming who you are signed in as and which workspace will receive your work. You need Node.js and npm, a Chainabit account, and access to a workspace.
1. Install and sign in
npm install -g @chainabit/cli
chainabit --version
chainabit auth login
chainabit auth whoamiComplete the browser authorization when prompted. Expected result: whoami identifies the account you intended to use. For a terminal without a browser, follow the device instructions or use a developer token. You can also sign in with a Chainabit API key; see configuration.
2. Choose your workspace
chainabit workspace listCopy an accessible workspace ID from the result, then select it:
WORKSPACE_ID='<workspace-id-from-the-list>'
chainabit workspace use "$WORKSPACE_ID"
chainabit workspace currentExpected result: workspace current shows the selected ID. This command reads local context; it does not validate membership. If it shows another workspace, check CHAINABIT_WORKSPACE_ID, which overrides the saved selection.
3. Create a small workflow
A Chain is an executable workflow. Its Bits are atomic executable tasks. Creating a Chain needs instructions describing work that can actually be performed.
chainabit chain create \
--title "Weekly customer update" \
--instructions "Collect approved customer changes, write a concise update, and save it as a workspace artifact."
chainabit chain listExpected result: the new workflow appears in your selected workspace. Creation and execution are separate operations. Creation can involve a model-backed assessment; check the returned result before trying again.
4. Run it and inspect the result
Copy the created Chain's ID. Triggering it starts work and can consume credits:
CHAIN_ID='<created-chain-id>'
chainabit chain trigger-run "$CHAIN_ID"
chainabit chain provenance "$CHAIN_ID" --kind artifactA successful trigger response is not proof the workflow has completed. Inspect the run and its output in Chainabit. Use provenance to trace produced artifacts back to work.
If you get stuck
| Symptom | What to check |
|---|---|
chainabit is not found | Confirm npm's global executable directory is on PATH, or use the project-local install. |
| Sign-in has not completed | Finish the browser or device authorization and run auth whoami again. |
| Wrong workspace | Inspect CHAINABIT_WORKSPACE_ID and recheck workspace current. |
| Creation or execution fails | Read the returned error, confirm account access and funding, and inspect existing records before repeating the mutation. |
| A request times out | Check whether the record or run was created before issuing a new command. |
The CLI reuses one idempotency identity during supported automatic retries. A new command invocation is a new operation; it is not a replay of the previous invocation.
Next
Use CLI usage to inspect workflows and install templates, or open the command reference for the exact syntax accepted by each command.