Loading...
The Token CLI saves your endpoint, key, and model choices as a named profile, then starts Claude Code, OpenClaw, or Hermes with that profile applied. No environment variables to paste each time you open a terminal.
Tell it to run token help profile add and read the output instead of copying commands from this page. The CLI's own help is generated from the same definitions that validate your flags, so it is always current — documentation drifts, help does not.
token help profile add
Three commands, run once each. After that, launching is a single line you can put in a shell alias.
token login opens your dashboard keys page and waits for you to paste a CLI key. The key is checked against the server before anything is written to disk.
token login
In a script or CI, pass the key directly instead:
token login --api-key "$TOKEN_SHARE_CLI_KEY" --json
Saved to ~/.token-share/credentials.json, readable only by you
A profile is a name attached to an endpoint, a key, and a set of models. Everything below can also be answered interactively — run token profile add with no flags and it will ask.
token profile add claude-code \ --name work \ --base-url "https://token-share.app" \ --api-key "sk-token-…" \ --all-models "claude-sonnet-5[1m]" \ --context-tokens 1000000 \ --compact-pct 95 \ --default \ --json
Which model flags exist depends on the harness. Claude Code has five slots (--model, --opus, --sonnet, --haiku, --subagent); OpenClaw and Hermes have one (--model). Use --all-models to fill every slot a harness has with the same id.
Saved to ~/.token-share/profiles.json — endpoint, key, and model slots under one name
This finds the harness binary on your PATH and starts it with the profile's environment applied. Anything after -- is passed straight through to the harness.
token launch token profile launch work # forward flags to the harness token profile launch work -- --resume
Finds the binary on your PATH, applies the profile, and hands over the terminal
Your account issues two separate key types, and neither can do the other's job. That split is the point: whichever one leaks, the damage stops at that half.
Both are created in the dashboard, where you pick the type. token login wants the CLI key; a profile stores an inference key.
Open KeysA profile belongs to exactly one harness, because each expects its endpoint and models in a different place. Copy a profile across with token profile copy — pass the profile name and a --target harness.
| Harness | Binary | Model slots |
|---|---|---|
| Claude Code | claude | 5 — primary plus opus, sonnet, haiku, and subagent aliases |
| OpenClaw | openclaw | 1 — needs a prompt, passed after -- |
| Hermes | hermes | 1 |
If you would rather run the harness yourself, token profile env prints the exact export lines the launch would have used, so the two can never drift apart.
eval "$(token profile env work)" claude
Every command prints its own reference, and --json makes any of them machine-readable for scripts.
Common commands
token profile list token profile show work token profile edit work --sonnet "claude-opus-5[1m]" token profile copy work --target openclaw token official usage --period 7d token doctor token help