Skip to content

CLI Installation

Global Install

bash
npm install -g chainabit

Verify the install:

bash
chainabit --version
chainabit --help
cb --help

Local Project Install

bash
npm install --save-dev chainabit
npm exec -- chainabit --help

Upgrade

bash
npm install -g chainabit@latest

Uninstall

bash
npm uninstall -g chainabit

After Install

The quickest way to start is:

bash
chainabit auth login
chainabit workspace use ws_123

If you are working in automation, prefer a developer token:

bash
export CHAINABIT_DEVELOPER_TOKEN="cbt_live_..."
chainabit auth login --token-env CHAINABIT_DEVELOPER_TOKEN

You can also use stdin when a pipeline already has the token available:

bash
printf '%s' "$CHAINABIT_DEVELOPER_TOKEN" | chainabit auth login --token-stdin

Secure Install Notes

  • Avoid passing passwords, API keys, or tokens directly on the command line when possible.
  • Local runs automatically prefer .env.local and production runs prefer .env.production. Use --env-file <path> or CHAINABIT_ENV_FILE when you need to override that.
  • If your environment already has a valid token, set CHAINABIT_TOKEN instead of performing an interactive login.

Troubleshooting

  • command not found: make sure your npm global bin is on PATH
  • wrong version after upgrade: restart your shell and run hash -r
  • private registry: configure npm registry/auth before installing

Built with purpose.