Skip to main content
The Concentrate CLI (cn) is in beta. It works on macOS and Linux. Report anything that doesn’t work to support@concentrate.ai.
cn starts your coding tools through Concentrate. It sets up each tool’s provider, models, and prices for you, so you can switch models without editing config files. The source is on GitHub.
  1. One command per tool — cn claude, cn codex, cn opencode, and cn pi start each tool on Concentrate.
  2. Your settings stay yours — Launching through cn doesn’t change the tool’s own settings or subscription login.
  3. Live model catalog — New models appear without updating cn.
  4. Prices and caching set up for you — OpenCode and pi show cost estimates from Concentrate’s prices, and Claude models use prompt caching.
  5. Usage analytics — Review requests, models, tokens, and costs in your dashboard.

Supported tools

Quick Start

  • macOS or Linux
  • Node.js 18.18 or newer
  • A Concentrate API key from concentrate.ai/api-keys, with credits on the account
  • The coding tools you want to use, installed and on your PATH
1

Install the CLI

The installer downloads the latest release from GitHub, verifies its SHA-256 checksum, and puts cn in ~/.local/bin. If that folder isn’t on your PATH, the installer prints the line to add to your shell profile. Open a new terminal afterward.
2

Save your API key

You can also run cn to open the launcher, which asks for your key the first time. If CONCENTRATE_API_KEY is set in your environment, cn <tool> can use it without a saved key.
3

Check your setup

cn doctor lists your installed tools and confirms your key. Run cn doctor <tool>, such as cn doctor pi, to send a live test request through that tool’s route.
4

Start a tool

Replace claude with codex, opencode, or pi. Add --model <id> to pick a model for this session, and put the tool’s own arguments after --:
Requests made through cn use your Concentrate API key and are billed at API rates. Subscription logins you already have in these tools stay saved and aren’t used while you run through cn.
Costs shown inside a coding tool are estimates. Your dashboard always shows what you’re actually billed.

Choose Models

cn lists each model once and Concentrate picks the provider.
New models come from the live catalog and appear in cn <tool> within an hour. You don’t need to update cn to use them.

Use a Tool’s Normal Command

cn configure saves Concentrate in the tool’s own settings, so you can run claude, codex, opencode, or pi directly:
This needs a key saved with cn setup or cn key; a key set only in CONCENTRATE_API_KEY isn’t enough. Restart the tool afterward. To switch back, run cn reset <tool>. It restores your earlier settings and keeps changes you made since.
  • Codex, OpenCode, and pi keep a copy of your key in their own settings, readable only by you. Claude Code gets the key from cn when it starts.
  • Configured tools keep a copy of the model list. Run cn refresh to add new models and prices.

Resume a Conversation

Run the resume command from the project folder where the conversation started:
A resumed conversation starts on the tool’s default model. Add --model <id> to use another one, and choose a model whose context window fits the conversation. You can also resume a conversation after reaching a subscription’s usage limit. New requests then go through Concentrate at API rates, and your subscription login stays saved.

Keep cn Up to Date

cn checks for a new version once a day and offers it the next time you start cn. You can also update at any time:
Installing or updating cn also refreshes the tools you configured. Set CN_NO_UPDATE_CHECK=1 to turn off the update prompt.

Tool Notes

  • Use Claude models or any other model in the Concentrate catalog.
  • Auto mode safety checks: with Claude models, the checks that review actions in auto mode are free. With other models, those checks run on the model you’re using and are charged at that model’s price. Set CLAUDE_CODE_AUTO_MODE_MODEL to use a different model for them.
  • Context window, output limits, and reasoning effort follow the model you pick, including when you switch models in a session. This needs Claude Code 2.1.287 or newer.
  • cn claude doesn’t change your regular Claude Code settings, even if you switch models inside the session.
  • Claude.ai connectors belong to a subscription login, so they’re off while you run through cn.
  • Claude Code estimates cost from its own price list, so /cost can be wrong for non-Claude models. Your dashboard shows the actual charges.
  • Codex works with OpenAI models for now. Pick one with cn model codex.
  • cn doesn’t change your Codex login or default model. Run codex for your ChatGPT subscription and cn codex for Concentrate.
  • The first time you run cn codex, it offers to set up plain codex resume so it can reopen conversations started through cn. This adds only the Concentrate provider. Undo it with cn reset codex.
  • cn codex starts Codex without its shared background server, so closed conversations don’t show up as open elsewhere.
  • Both tools show cost estimates based on Concentrate’s prices. They’re estimates: a model can be offered by several providers at different prices, so a session’s estimate can differ from what you’re billed. Your dashboard always shows the actual charges.
  • cn pi keeps your pi extensions, skills, and MCP configuration.
  • cn pi and cn configure pi need pi 0.77 or newer. Check with pi --version and update with pi update self.
  • Quit Cursor completely before running cn configure cursor or cn reset cursor, and open it once beforehand so its settings exist.
  • This sets up the Cursor desktop editor, not the Cursor command-line tool. Tab completions keep using Cursor’s own models.
  • Cursor stores your key and sends requests through Cursor’s servers before they reach Concentrate.
  • Setup needs sqlite3, which is included with macOS.

Your Key and Privacy

  • cn stores your key in ~/.config/concentrate-cli/, readable only by your user. Set CN_CONFIG_HOME to use another folder.
  • The key is never passed on the command line, where other programs could read it.
  • cn key replaces the saved key and updates the copies in configured tools. cn logout removes the key and those copies.

Command Reference

Run cn --help for every option.

Remove the CLI

Run cn reset <tool> for each tool you configured, then clear what cn saved and delete it:
cn reset --yes keeps saved pi conversations. Add --sessions to remove them too.

Troubleshooting

Add ~/.local/bin to your PATH using the line the installer printed, then open a new terminal.
Install a current Node.js release, then run the installer again.
Run cn setup to save a key, or cn key to replace one. Check that it matches a key at concentrate.ai/api-keys. A 402 response means the account needs credits.
Tools set up with cn configure keep a copy of the model list. Run cn refresh. cn <tool> always uses the current list.
Run pi update self, then start cn pi again.
Pick a gpt-* model with cn model codex.
Run cn --version and cn doctor, then email the output to support@concentrate.ai.

Next Steps

Available Models

Browse the model catalog.

Prompt Caching

Learn how caching lowers the cost of long sessions.
Last modified on November 10, 2026