Skip to content

CLI Installation Guide

  • Node.js 22 or newer — the CLI declares engines: { node: ">=22.0.0" } and will refuse to run on older releases (download)
  • npm 10+ (ships with Node 22)

The user CLI is published to the public npm registry as tokenbot — unscoped:

Terminal window
npm install -g tokenbot

Verify:

Terminal window
tokenbot --version

The @tokenbot-org/* packages are libraries published to GitHub Packages — cli-core, sdk, data-models and the internal admin-cli. They are not the user CLI and most people never install them directly.

For reproducible scripts, install it as a dev dependency and call it through npx:

Terminal window
npm install --save-dev tokenbot
npx tokenbot strategy list

The global npm bin directory probably isn’t on your PATH:

Terminal window
# Where did npm put it?
npm list -g tokenbot
# Add npm's bin directory to PATH (append to ~/.bashrc or ~/.zshrc)
export PATH="$(npm config get prefix)/bin:$PATH"
tokenbot --version

Don’t reach for sudo. Point npm at a directory you own instead:

Terminal window
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
npm install -g tokenbot
Terminal window
node --version # must be v22.0.0 or higher

If you manage multiple versions, nvm use 22 before installing — a CLI installed under an older Node stays bound to it.