One-command setup
Bring Token Harbor to the agent you already use
Token Harbor speaks the OpenAI and Anthropic APIs, so your coding agent already works with it. One command wires it up — no base-URL, no key wrangling.
macOS / Linux
$ curl -fsSL https://tokenharbor.ai/connect.sh | shWindows (PowerShell)
$ irm https://tokenharbor.ai/connect.ps1 | iexPiping a script into a shell is worth a look first — that is the whole point of the advice, so here is the link: read connect.sh · connect.ps1. Or save it and run it separately: curl -fsSL https://tokenharbor.ai/connect.sh -o connect.sh.
Nothing to install first — even Node.js is provisioned automatically if your machine doesn't have it. It opens a menu: connect your agents, pick them one by one, or undo what the CLI changed. New to the terminal? On a Mac press ⌘ Space, type “Terminal”, hit Enter, then paste the command. On Windows, search “PowerShell”.
$ curl -fsSL https://tokenharbor.ai/connect.sh | sh Downloading the Token Harbor CLI… done Verifying key… ok Detected: Claude Code, Codex CLI, Cursor ✓ Claude Code — configured ✓ Codex CLI — configured ✓ Cursor — manual steps ↓ Done. Open a new terminal and your agents use Token Harbor.
Claude Code, Cursor, Codex…
one key · smart routing
Run one command
Paste the install command above into your terminal, then paste the key when asked.
Start building
Open a new terminal — your agent now routes through us.
Client compatibility
Auto= the CLI edits that agent's own config file for you (after backing it up). Guided = the agent has no file we are willing to rewrite unattended, so the CLI sets the universal environment variables and prints the exact Base URL and key to paste. Unsupportedmeans the client's current official interface has no safe custom-gateway option; we do not pretend otherwise. No agents installed yet? You can chat in your browser right away and connect an agent later.
Automated installed-client checks exercise Codex, opencode, OpenClaw, Qwen Code, and current + legacy pi. Claude Code is request-tested locally and its generated settings are checked in CI. Guided entries follow the linked official setup instructions.
More commands
After installing, tokenharbor is on your PATH:
$ tokenharbor status$ tokenharbor models$ tokenharbor disconnect$ tokenharbor uninstallFull command reference, per-agent notes and troubleshooting in the Connect docs.
Safe by design
- Reversible. disconnect undoes what the CLI wrote: Auto agents' config files go back to what they held before, and the environment variables are removed. Anything you changed yourself afterwards is left alone and reported. What you pasted into a Guided agent's own settings screen is yours to remove — the CLI never wrote it and will not touch it. uninstall additionally removes the PATH entry and ~/.tokenharbor.
- Non-destructive. Files are copied to .th-backup before any edit. If the backup can't be written, nothing is changed at all.
- Where your key goes. Into ~/.tokenharbor/ (mode 0600), and into OPENAI_API_KEY/ANTHROPIC_AUTH_TOKEN in your shell profile — on Windows, your user environment. For Auto agents clients reference the environment variable where their official format supports it; Claude Code is the exception because its documented gateway setup stores the token in its own settings. Guided agents get nothing written for them: you paste the key in yourself. It is never sent anywhere but Token Harbor.
- Verified, not trusted. The installer pins Node and checks its official SHA-256, and checks the CLI against a published checksum before running it.
CLI v0.6.1
sha256 c1595895338d00019f86344136da6a54…
manifest.json