TokenCode CLI configures common coding tools through an interactive wizard or one-line commands. It merges your API key, Base URL, and default model into each tool's native configuration while preserving unrelated settings.

npm install -g @tokencode/tokencode
tokencode
You can also run the same wizard without a global installation:
npx @tokencode/tokencode
The tcd and tkc aliases are also available.
Run tokencode, then:
| Tool | Commands | Configuration files |
|---|---|---|
| Claude Code | cc, claude | ~/.claude/settings.json |
| OpenAI Codex | codex, cx | ~/.codex/config.toml, ~/.codex/auth.json |
| OpenCode | opencode, od | ~/.config/opencode/opencode.json |
| OpenClaw | openclaw, oc | ~/.openclaw/openclaw.json |
| Hermes Agent | hermes, hm | ~/.hermes/config.yaml, ~/.hermes/.env |
| Atomcode | atomcode, ac | ~/.atomcode/config.toml |
Replace sk-your-api-key with your TokenCode API key. Change --model to any available model ID.
npx @tokencode/tokencode cc -k sk-your-api-key -m claude-sonnet-4-6
npx @tokencode/tokencode cx -k sk-your-api-key -m gpt-5.5
npx @tokencode/tokencode od -k sk-your-api-key -m claude-sonnet-4-6
npx @tokencode/tokencode oc -k sk-your-api-key -m claude-sonnet-4-6
npx @tokencode/tokencode hm -k sk-your-api-key -m claude-sonnet-4-6
npx @tokencode/tokencode ac -k sk-your-api-key -m claude-sonnet-4-6
| Option | Purpose |
|---|---|
| --key / -k | Set the TokenCode API key |
| --url / -u | Set the Base URL |
| --model / -m | Set the default model |
| --show / -s | Show the current configuration |
tokencode cc --show
tokencode cx --show
tokencode od --show
| Tool | Default Base URL |
|---|---|
| Claude Code | https://tokencode.dev |
| Codex | https://tokencode.dev/v1 |
| OpenCode | https://tokencode.dev/v1 |
| OpenClaw | https://tokencode.dev/v1 |
| Hermes Agent | https://tokencode.dev/v1 |
| Atomcode | https://tokencode.dev/v1 |
For a private deployment, override the URL with -u:
tokencode cc -u https://your-domain.com
tokencode cx -u https://your-domain.com/v1
Run tokencode <command> --show and verify the Base URL, API key, and model. Reopen your terminal or restart the tool after updating its configuration.
Check that the API key is complete, contains no extra spaces, and that your account has available balance. Run the CLI again to avoid using the wrong field name.
You can still enter a model ID manually:
tokencode cc -m claude-sonnet-4-6