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

# Claude IDE Extension

> Set up the Anthropic Claude extension for VS Code, Cursor, and Windsurf with CCS profiles

# Claude IDE Extension

CCS includes a native setup flow for the Anthropic Claude extension in VS Code-compatible hosts. The same resolver powers the CLI and dashboard, so API profiles, CCS auth accounts, CLIProxy-backed profiles, Copilot, and the current `default` profile all map to the correct environment shape.

## Supported Hosts

| Host     | Settings Key                       | Notes                                      |
| -------- | ---------------------------------- | ------------------------------------------ |
| VS Code  | `claudeCode.environmentVariables`  | Also emits `claudeCode.disableLoginPrompt` |
| Cursor   | `claudeCode.environmentVariables`  | Same schema as the VS Code host            |
| Windsurf | `claude-code.environmentVariables` | Uses the legacy kebab-case extension keys  |

## Preferred Setup: Shared Settings

Use `ccs persist <profile>` when you want the Claude CLI and the IDE extension to share the same CCS profile via `~/.claude/settings.json`.

```bash theme={null}
ccs persist glm
ccs persist work
ccs persist default
```

This is the recommended path for daily use because CCS manages backup/restore for `~/.claude/settings.json` and keeps one shared source of truth.

## IDE-Local Snippet Setup

Use `ccs env --format claude-extension` when you want to edit the IDE host's own `settings.json` instead of the shared Claude settings file.

```bash theme={null}
ccs env glm --format claude-extension --ide vscode
ccs env work --format claude-extension --ide cursor
ccs env default --format claude-extension --ide windsurf
```

The command prints a copy-ready JSON object for the target host. Merge the emitted keys into that host's `settings.json`.

* `vscode` / `cursor`: `claudeCode.environmentVariables` and, when needed, `claudeCode.disableLoginPrompt`
* `windsurf`: `claude-code.environmentVariables`

Example output for VS Code or Cursor:

```json theme={null}
{
  "claudeCode.environmentVariables": [
    {
      "name": "ANTHROPIC_BASE_URL",
      "value": "http://127.0.0.1:3456"
    },
    {
      "name": "ANTHROPIC_AUTH_TOKEN",
      "value": "..."
    }
  ],
  "claudeCode.disableLoginPrompt": true
}
```

## Profile Resolution Rules

* **Account profiles** use `CLAUDE_CONFIG_DIR` so the extension opens the isolated Claude instance directory directly.
* **Default profile** clears CCS-managed transport env vars unless continuity inheritance maps `default` back to an account.
* **CLIProxy-backed and Copilot profiles** emit `ANTHROPIC_*` transport variables and still depend on their local proxy/daemon being reachable.
* **Settings/API profiles** emit the exact Anthropic-compatible environment from the selected `.settings.json`.

## Dashboard Workflow

Open the dashboard:

```bash theme={null}
ccs config
```

Then go to **Claude Extension** in the sidebar.

The page lets you:

* Pick a CCS profile and host
* Copy the preferred shared-settings command (`ccs persist <profile>`)
* Copy an IDE-local JSON snippet for VS Code, Cursor, or Windsurf
* Save reusable bindings with custom IDE settings paths
* Verify whether the target files are `applied`, `drifted`, `missing`, or `unconfigured`
* Apply or reset shared settings, IDE settings, or both

## Troubleshooting

### Extension still shows the login prompt

* Re-copy the correct host-specific snippet
* For VS Code or Cursor, make sure `claudeCode.disableLoginPrompt` is present when CCS emits it

### Profile works in CLI but not in the IDE

* For CLIProxy/Copilot-backed profiles, ensure the local proxy or daemon is reachable
* For account/default profiles, confirm the resolved `CLAUDE_CONFIG_DIR` exists
* Re-run `ccs persist <profile>` if you want the shared settings path refreshed

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Commands" icon="terminal" href="/reference/cli-commands">
    See `ccs persist`, `ccs env`, and `ccs config` command reference
  </Card>

  <Card title="Cursor Integration" icon="code" href="/features/workflow/cursor">
    Route Cursor models through CCS and pair them with the Claude extension host
  </Card>
</CardGroup>
