CLI Usage
1. Sign In
Interactive sessions default to the browser/device flow:
bash
chainabit auth login
chainabit auth statusFor scripts and CI, use a developer token:
bash
export CHAINABIT_DEVELOPER_TOKEN="cbt_live_..."
chainabit auth login --token-env CHAINABIT_DEVELOPER_TOKENIf the browser/device flow is unavailable on an environment, the CLI will point you to the browser login page. For repeatable automation, create a developer token and use the explicit token login path above.
Local runs prefer .env.local and production runs prefer .env.production. If you need to override that resolution, pass a specific file explicitly:
bash
chainabit --env-file ./.chainabit.env auth status2. Pin a Workspace
bash
chainabit workspace list
chainabit workspace use ws_123
chainabit workspace currentworkspace use also marks the workspace as active on the API side, so your other signed-in devices pick up the switch as a UX hint next time they load.
3. Manage Chainies and Chains
bash
chainabit chainy create --title "Health Goals"
chainabit chainy list
chainabit chainy update cy_123 --title "Updated Goals"
chainabit chainy collaborators invite cy_123 --chainer chainer_456 --role member
chainabit chainy invites list
chainabit chain create --title "Morning Workout" --chainy cy_123
chainabit chain list --chainy cy_123
chainabit chain streak ch_1234. Track Bits
bash
chainabit bit create --title "Push-ups" --chain ch_123
chainabit bit list --chain ch_123
chainabit bit complete bit_123 --notes "50 reps"5. Run AI Workflows
bash
chainabit ai session create --title "Weekly review"
chainabit ai message send sess_123 --message "Summarize my progress"
chainabit ai analyze create --period 7d --chain ch_123
chainabit ai suggest create --chain ch_123
chainabit ai models
chainabit ai sessions share sess_123
chainabit ai sessions invite sess_123 --chainer chainer_4566. Chat With Chao
bash
chainabit chao
chainabit chao --message "Give me a plan for tomorrow"
chainabit chao --session sess_1237. Manage Connectors
bash
chainabit connectors list --category productivity
chainabit connectors install slack --name "Team Slack"
chainabit connectors auth inst_123
chainabit connectors auth inst_123 --api-key-env SLACK_API_KEY
chainabit connectors test inst_123
chainabit connectors tools inst_123
chainabit connectors exec inst_123 send_message --input '{"channel":"#general","text":"Hello"}'
chainabit connectors sync inst_123
chainabit connectors executions inst_1238. Script Everything
The --json flag makes output safe to pipe into jq or another parser.
bash
chainabit chain list --json
chainabit wallet balance --json
chainabit connectors list --json | jq '.[0].key'9. Global Flags
--jsonmachine-readable output--api-url <url>one-command API base override--env-file <path>trusted env file for this command invocation--helpusage help-v, --versionversion output