> ## 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.

# Claude Code

> Connect Costa to Claude Code CLI for secure AI development

## Quick Setup

Before you can use Claude Code with Costa, you need to install Claude Code. You can install it using NPM or native install methods. For detailed instructions, see the [Claude Code Quickstart Guide](https://docs.claude.com/en/docs/claude-code/quickstart).

Claude Code works seamlessly with Costa using our native Claude Code configuration. Just create a settings file and you're done.

Use this curl command to fetch your Costa configuration directly:

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    costa setup claude-code
    ```

    How to install the CLI? [ click here](/cli)
  </Tab>

  <Tab title="Manual">
    ### Step 1: Create Settings File

    Create `.claude/settings.json` in your project directory:

    ```bash theme={null}
    mkdir -p .claude
    ```

    ### Step 2: Configure Costa Integration

    Add the Costa configuration to `~/.claude/settings.json`:

    ```json ~/.claude/settings.json theme={null}
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://ai.costa.app/api",
        "ANTHROPIC_AUTH_TOKEN": "REPLACE_WITH_YOUR_API_KEY",
        "ANTHROPIC_DEFAULT_OPUS_MODEL": "costa/auto",
        "ANTHROPIC_DEFAULT_SONNET_MODEL": "costa/auto",
        "ANTHROPIC_DEFAULT_HAIKU_MODEL": "costa/auto",
        "CLAUDE_CODE_SUBAGENT_MODEL": "costa/auto",
        "DISABLE_PROMPT_CACHING": "true"
      },
      "model": "costa/auto",
      "alwaysThinkingEnabled": true
    }
    ```

    ### Step 3: Start Coding

    That's it! Just run:

    ```bash theme={null}
    claude
    ```

    Your Claude Code instance is now connected to Costa's secure infrastructure, unlocking powerful features:

    * **Costa Auto Router** intelligent model selection
    * **Zero-trust security** scanning all interactions
    * **Enterprise compliance** and audit logging
    * **Performance analytics** to track your coding efficiency and model performance

    #### Claude Code CLI

    Claude Code works seamlessly with Costa in the CLI...

    <Frame>
      <img src="https://docs-cdn.costa.security/images/claude-code/claude-code-cli.png" alt="Claude Code CLI interface" style={{ borderRadius: '0.5rem' }} />

      <figcaption>Claude Code running in the command line interface</figcaption>
    </Frame>

    #### Claude Code VS Code Extension

    ... and also in Claude's VS Code extension.

    <Frame>
      <img src="https://docs-cdn.costa.security/images/claude-code/claude-code-vscode.png" alt="Claude Code in VS Code" style={{ borderRadius: '0.5rem', maxHeight: '400px' }} />

      <figcaption>Claude Code integrated in Visual Studio Code</figcaption>
    </Frame>

    ### Unlock the power of Claude Code with any model

    You can use any model with Claude Code, including `costa/orbit`, `gpt-5`, and others.

    If you love Claude Code, but have ever wondered whether it's the IDE or models that give you that extra edge... with Costa you can break free from your IDE.

    Use any model you want and compare cross-model performance with Costa's [<Icon icon="chart-no-axes-combined" /> Analytics](/insights) over time and find the combinations that are best for you.

    For a full list of available models, visit [https://ai.costa.app/code/models](https://ai.costa.app/code/models).

    ### Alternative Setup Methods

    #### Environment Variables

    Instead of the settings file, you can use environment variables:

    ```bash theme={null}
    export ANTHROPIC_BASE_URL=https://ai.costa.app/api
    export ANTHROPIC_AUTH_TOKEN=your_costa_token_here
    export ANTHROPIC_DEFAULT_OPUS_MODEL=costa/auto
    export ANTHROPIC_DEFAULT_SONNET_MODEL=costa/auto
    export ANTHROPIC_DEFAULT_HAIKU_MODEL=costa/auto
    export CLAUDE_CODE_SUBAGENT_MODEL=costa/auto
    export DISABLE_PROMPT_CACHING=true
    claude
    ```
  </Tab>
</Tabs>
