Set up your tools

One command configures Claude Code, Codex, OpenCode, Continue, Zed and Aider, and prints settings for Cursor, Cline, Roo and Kilo.

One command points your coding tools at Top Billing. It asks for your API key, checks it, shows the models your key can use, and writes each tool's config file for you. Every file it changes is backed up first.

shell
npx @topbilling/cli

It offers two ways in: sign in with your browser (it shows a short code, you approve it on app.topbilling.in, and a key named after this machine is created for the project you pick), or paste a key you already have. Only setting up Claude Code? Run npx @topbilling/cli claude. You need Node.js 20.12 or newer, and a live key from the API keys page.

What it configures

Claude Codeterminal
Writes the env block of ~/.claude/settings.json: base URL, key, default model, the model aliases and the context window.
Claude Code extensionVS Code, Cursor, Windsurf
Writes claudeCode.environmentVariables in the editor's user settings.
Codex CLICLI
Adds a topbilling provider to ~/.codex/config.toml on the Responses API. See Codex CLI.
OpenCodeCLI
Adds a topbilling provider to ~/.config/opencode/opencode.json.
ContinueVS Code, JetBrains
Adds models to ~/.continue/config.yaml; the key goes in ~/.continue/.env.
Zededitor
Adds an OpenAI-compatible provider to Zed's settings. Paste your key in the Agent panel.
AiderCLI
Writes ~/.aider.conf.yml.
Cursor, Cline, Roo Code, Kilo Codeeditors
These keep settings in their own screens, so the command prints exactly what to paste where.

Commands

shell
npx @topbilling/cli            # interactive setup
npx @topbilling/cli login      # sign in with your browser — no key to copy
npx @topbilling/cli claude     # Claude Code only
npx @topbilling/cli usage      # balance, spend, and what each coding session cost
npx @topbilling/cli models     # the models your key can use
npx @topbilling/cli mcp install  # Claude Code can then tell you your balance and what a session cost
npx @topbilling/cli env        # print environment variables for your shell
npx @topbilling/cli status     # check the key and what each tool points at
npx @topbilling/cli remove     # undo everything it changed

In scripts and CI

Pass the key and the tools, and it asks nothing:

shell
TOPBILLING_API_KEY=tb_live_... npx @topbilling/cli --tools claude-code,opencode --yes

Add --dry-run to see the files it would write, with your key masked, without writing anything.

Your key is stored in each chosen tool's own config file, because that is where those tools read it, and in ~/.topbilling/config.json so later commands do not ask again. The command never prints the full key, and it only ever talks to Top Billing: https://api.topbilling.in for models and usage, and app.topbilling.in for browser sign-in.