[Go to site: main page, start]

Skip to content

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 ​

bash
npm install -g @chainabit/cli
chainabit --version
chainabit auth login
chainabit auth whoami

Complete 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 ​

bash
chainabit workspace list

Copy an accessible workspace ID from the result, then select it:

bash
WORKSPACE_ID='<workspace-id-from-the-list>'
chainabit workspace use "$WORKSPACE_ID"
chainabit workspace current

Expected 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.

bash
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 list

Expected 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:

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

A 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 ​

SymptomWhat to check
chainabit is not foundConfirm npm's global executable directory is on PATH, or use the project-local install.
Sign-in has not completedFinish the browser or device authorization and run auth whoami again.
Wrong workspaceInspect CHAINABIT_WORKSPACE_ID and recheck workspace current.
Creation or execution failsRead the returned error, confirm account access and funding, and inspect existing records before repeating the mutation.
A request times outCheck 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.

Built with purpose. chainabit.com