> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costa.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Claude Code

<Callout icon="compass">
  Connect Claude Code to Costa. Turn on Trim. Build a Cosmic Router.
</Callout>

<div className="tw-reset costatw:my-4 costatw:px-4 costatw:py-2 costatw:rounded-lg costatw:text-sm costatw:bg-zinc-100 costatw:text-zinc-600 costatw:dark:bg-zinc-800/50 costatw:dark:text-zinc-400">
  Using a different tool? <a href="/get-started/codex">Codex</a> · <a href="/get-started/opencode">opencode</a> · <a href="/integrations/other-agents">something else</a>
</div>

## Before you start

You'll need:

* **Claude Code** installed and signed in **with a subscription**.
* A terminal you're comfortable in.

Don't have a Claude Code subscription? [Get one from Anthropic →](https://www.anthropic.com/claude-code), [use your own Anthropic API key →](/get-started/anthropic-api-key), or [add another provider →](/byok).

<Steps>
  <Step title="Install Costa">
    Copy this into your terminal and run it:

    ```bash theme={null}
    curl -fsSL https://raw.githubusercontent.com/costa-app/costa-cli/main/install.sh | sh -
    ```

    When the install finishes, Costa walks you through:

    1. Creating your Costa account.
    2. Picking a **callsign** — your public username on Costa.
    3. Landing on the **Integrations** menu.

    Stay in the TUI. The next step happens there.
  </Step>

  <Step title="Enable Claude Code">
    You're now on the Integrations tab. You'll see something like this:

    <pre style={{fontFamily: '"CommitMono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace', fontFeatureSettings: '"liga" 0, "calt" 0', fontVariantLigatures: 'none', whiteSpace: 'pre', lineHeight: 1, fontSize: '0.875rem', margin: 0, padding: '1rem 1.25rem'}}>
      {"\n  ╭──────────────────╮  ╭────────────╮  ╭─────────────╮  ╭──────────────╮\n  │  Integrations    │  │   Tokens   │  │   Threads   │  │   Settings   │\n  │                  │  ╰───────────────────────────────────────────────╯\n\n  Integration      Installed    Enabled    Token   Agent\n  ─────────────────────────────────────────────────────────\n▸ claude-code      ✓ yes        ✗ no       —       —\n  codex            ✓ yes        ✗ no       —       —\n  kilo             ✗ no         ✗ no       —       —\n  opencode         ✗ no         ✗ no       —       —\n\n  enter to enable costa"}
    </pre>

    Use the arrow keys to highlight **claude-code**, then press **Enter**. Costa writes a Costa profile into `~/.claude/config.json` and flips the row to **Enabled ✓**.

    **Restart Claude Code** so it picks up the new config.
  </Step>

  <Step title="Send your first prompt">
    Open Claude Code (i.e. with `claude`) and ask it to do something real — fix a bug, write a test, refactor a file. Then open your [session dashboard](https://ai.costa.app/code/dashboard/sessions) and watch your messages stream in.

    You'll see the prompts, the model that handled it, the tool calls, and the running token count. That's Costa working underneath Claude Code. You can also view your [live dashboard](https://ai.costa.app/code/metrics/live) to see response times by provider and model.
  </Step>
</Steps>

<Card title="Next: Turn on Trim" icon="scissors" href="/get-started/trim" horizontal>
  Strip unused tokens before they reach the model.
</Card>
