Command line

One command instead of a wall of exports

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.

How it fits together

Three commands, run once each. After that, launching is a single line you can put in a shell alias.

1

Sign in

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

2

Save a profile

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

3

Launch

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

Two kinds of key

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.

CLI key

Can do

Sign in, list and create inference keys, read usage and the model catalog

Cannot do

Run inference — a leaked CLI key spends nothing and cannot mint another CLI key

Inference key

Can do

Run models through the API and every harness

Cannot do

Touch your account — a leaked inference key can see what its own requests cost, but not the account balance or any other request, and cannot list keys or revoke anything

Both are created in the dashboard, where you pick the type. token login wants the CLI key; a profile stores an inference key.

Open Keys

Supported harnesses

A 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.

HarnessBinaryModel slots
Claude Codeclaude5 — primary plus opus, sonnet, haiku, and subagent aliases
OpenClawopenclaw1 — needs a prompt, passed after --
Hermeshermes1

Or just get the variables

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

Everything else

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