CLI Installation
Global Install
bash
npm install -g chainabitVerify the install:
bash
chainabit --version
chainabit --help
cb --helpLocal Project Install
bash
npm install --save-dev chainabit
npm exec -- chainabit --helpUpgrade
bash
npm install -g chainabit@latestUninstall
bash
npm uninstall -g chainabitAfter Install
The quickest way to start is:
bash
chainabit auth login
chainabit workspace use ws_123If you are working in automation, prefer a developer token:
bash
export CHAINABIT_DEVELOPER_TOKEN="cbt_live_..."
chainabit auth login --token-env CHAINABIT_DEVELOPER_TOKENYou can also use stdin when a pipeline already has the token available:
bash
printf '%s' "$CHAINABIT_DEVELOPER_TOKEN" | chainabit auth login --token-stdinSecure Install Notes
- Avoid passing passwords, API keys, or tokens directly on the command line when possible.
- Local runs automatically prefer
.env.localand production runs prefer.env.production. Use--env-file <path>orCHAINABIT_ENV_FILEwhen you need to override that. - If your environment already has a valid token, set
CHAINABIT_TOKENinstead of performing an interactive login.
Troubleshooting
command not found: make sure your npm global bin is onPATH- wrong version after upgrade: restart your shell and run
hash -r - private registry: configure npm registry/auth before installing