Skip to main content

Configure coding tools with the tare CLI

tare integrate sets up popular AI coding tools to send their model calls through your Agent Router gateway, using your own Agent Router credentials. Instead of copying a base URL and API key into each tool by hand, one command reads your logged-in session and writes the tool's config for you.


Persona: Developer configuring a local coding tool against an Agent Router gateway.

Estimated time: 5--10 minutes after the CLI is installed and you are logged in.

Outcomes

By the end of this guide:

  • The tare CLI is installed and authenticated against your management plane.
  • You know which data plane (gateway) to use, identified by its dataplane id.
  • At least one coding tool is configured through tare integrate, with a dry-run preview first if you want to inspect the change.
  • You can rotate or clean up keys and backed-up config files safely.

Prerequisites

  1. Install the tare CLI:
curl -fsSL https://tare.tetrate.ai/tools/install.sh | bash
tare --version
  1. Log in so the CLI can reuse your session (data plane, model catalog, and API key):
tare api login --base-url https://api.example.tetrate.ai

You can skip login and pass --gateway-url, --api-key, and --model explicitly instead, but then nothing is reused from your account.

  1. Know which data plane (gateway) to route through. List them with:
tare integrate dataplanes

Example output:

DATAPLANE NAME GATEWAY URL
acme-prod Acme Production https://acme-prod.gateway.example.com
acme-dev Acme Dev https://acme-dev.gateway.example.com

--dataplane takes the workspace id from the DATAPLANE column (for example acme-prod), not the display name.


Supported tools

tare integrate list

shows every supported tool, whether it is detected on your machine, and where its config file would go. Supported tools include Aider, Claude Code, Claude Cowork, Cline, Codex, Continue, Hermes, and OpenClaw.


Preview a change (dry run)

tare integrate <tool> --dry-run --dataplane <name>

Prints exactly what would be set, with the API key masked, and confirms no file is written.

Claude Code

tare integrate claude-code --dry-run --dataplane acme-prod
Detected Claude Code: found `claude` at /Users/you/.local/bin/claude

Claude Code (/Users/you/.claude/settings.json):
set env.ANTHROPIC_BASE_URL = https://acme-prod.gateway.example.com
set env.ANTHROPIC_API_KEY = sk-test1...
set env.ANTHROPIC_MODEL = claude-sonnet-5

--dry-run: no changes written.

Codex

Codex writes two files (config.toml for the provider block, .env for the key):

tare integrate codex --dry-run --dataplane acme-prod
Detected Codex: found `codex` at /Users/you/.bun/bin/codex

Codex (/Users/you/.codex/config.toml):
/Users/you/.codex/config.toml:
set model = gpt-5
set model_provider = agentrouter
set [model_providers.agentrouter] base_url/env_key/wire_api
/Users/you/.codex/.env:
set AGENTROUTER_API_KEY = sk-test1...

--dry-run: no changes written.

Apply a change

tare integrate <tool> --dataplane <name> --yes

For example:

tare integrate claude-code --dataplane acme-prod --yes

When you apply:

  • The command reuses your logged-in session's data plane, model catalog, and API key by default. Override any of them with --gateway-url, --api-key, or --model.
  • It mints a new inference key only if one is not already cached for your profile and that data plane; otherwise it reuses the cached key.
  • If a config file already exists, it is backed up first (<file>.bak-<timestamp>) before being overwritten.
  • The written file gets 0600 permissions (owner read/write only).
  • After writing, it makes one call to the configured gateway to confirm the key works, and reports the result.

Claude Code: managed mode vs. passthrough mode

tare integrate claude-code supports two modes:

  • Managed (default). Sets env.ANTHROPIC_BASE_URL, env.ANTHROPIC_API_KEY, and env.ANTHROPIC_MODEL in ~/.claude/settings.json. Every Claude Code call goes through your Agent Router gateway using the issued key.
  • Passthrough (--passthrough). Keeps your own claude /login session for model calls, so usage is billed to your existing Claude plan. The Agent Router key is only sent as an x-tars-api-key header for attribution; ANTHROPIC_API_KEY is left unset.
tare integrate claude-code --dataplane acme-prod --passthrough --yes

Trade-off: while managed mode's ANTHROPIC_API_KEY is set, Claude Code disables claude.ai connectors, because an explicit API key takes precedence over your claude.ai login. If you use connectors, choose passthrough mode instead, or remove the env block from ~/.claude/settings.json when you need them.

For the full Claude Code walkthrough (install, verify with /status, troubleshooting), see Connect Claude Code.


Known issues

Some newer model names reject temperature=0. Several OpenAI-compatible tools (Aider and similar) default to temperature=0 for any model they do not recognize by name. If the model you selected rejects a temperature of 0, the first request fails immediately with something like 'temperature' is deprecated for this model, even though the model works fine otherwise.

Workaround: pin a non-zero temperature for that model in the tool's own per-model settings. For Aider, add an entry to .aider.model.settings.yml with extra_params: {temperature: 1}.


Cleanup and rotation

  • An apply either mints a new inference key or reuses a cached one. Check which before revoking anything — revoking a key still referenced by a tool's config will break that tool until you re-apply.
  • To rotate a key: revoke the old one (tare api keys revoke <key-id>), then re-run tare integrate <tool> --dataplane <name> --yes to mint and write a fresh one.
  • Backed-up config files (<file>.bak-<timestamp>) build up with every apply. Clean them out periodically if you do not need the history.