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

# VS Code extension

> Switch ccp profiles from the command palette and status bar

The ccp VS Code extension surfaces every profile operation inside the editor and adds workspace pinning for the official Claude Code panel.

## Install

The extension is not published to the VS Code Marketplace yet. Install from the latest `.vsix` on the [GitHub Releases page](https://github.com/kloudlinq/ccp-profile-manager/releases):

```bash theme={null}
code --install-extension ccp-profile-manager-<version>.vsix
```

Or build it yourself from a clone with `npm run package:ext`.

## Commands

Every command is available through the command palette (`⌘⇧P`):

| Command                                    | Description                                                                                                                         |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `Claude Profile: Switch...`                | QuickPick every profile, apply the selected one, prompt for a window reload                                                         |
| `Claude Profile: New / Login...`           | Walk through the right creation flow for the chosen auth type; subscription opens an integrated terminal for the OAuth browser flow |
| `Claude Profile: Manage...`                | Switch, inspect, or delete existing profiles                                                                                        |
| `Claude Profile: Pin This Workspace To...` | Bind the current workspace to a profile via `.vscode/ccp.local.json`                                                                |
| `Claude Profile: Apply MCP Server Set...`  | Pick a profile and a JSON file, replace that profile's user-scope MCP servers                                                       |
| `Claude Profile: Run Doctor...`            | Run preflight checks in an output panel                                                                                             |
| `Claude Profile: Export...`                | Save a profile's shape (no secrets) via a native file dialog                                                                        |
| `Claude Profile: Import...`                | Import an exported profile shape via a native file dialog                                                                           |

<Note>
  `Claude Profile: Switch...` prompts a window reload after applying the profile. The reload is required — the official Claude Code extension only re-reads its environment settings when the panel is reopened or the window reloads.
</Note>

## Status bar

A status bar item (bottom right) always shows the active profile. Clicking it is a shortcut to **Claude Profile: Switch...**.

The status bar item is tracked machine-wide, matching what's actually true of the Claude Code panel's routing (see below).

## Workspace pinning

Bind a repository folder to a specific profile so you get a modal warning if you open it with the wrong profile active:

1. Run **Claude Profile: Pin This Workspace To...**.
2. Pick the profile the workspace expects.

The extension writes `.vscode/ccp.local.json`:

```json .vscode/ccp.local.json theme={null}
{
  "profile": "work"
}
```

The file is auto-added to `.gitignore` and only ever contains a profile **name** — never a secret, base URL, or Keychain reference. Opening a pinned workspace while a different profile is active triggers a modal warning before anything proceeds. The check warns; it doesn't block.

## The panel is machine-wide, for every auth type

The official Claude Code extension declares its `claudeCode.environmentVariables` setting with `"scope": "application"`. VS Code enforces application scope as **User settings only** at the core level — attempting to write it at Workspace or WorkspaceFolder scope throws `"can be written only into User settings."` (This isn't an assumption; an earlier version of ccp tried Workspace scope for non-secret profile types and hit that exact error.)

**Practical effect:** switching profiles in the VS Code Claude Code panel changes it for **every open window's panel**, for every auth type, no exceptions.

Real per-context parallelism — for example, `personal` in one terminal tab and `work` in another — only exists on the **terminal side**, via the zsh wrapper function, which genuinely is per-shell. The workspace pin check is there to warn you when the machine-wide panel doesn't match a workspace's expectation.

## Known limitations

* The extension is macOS-only today, matching the CLI's Keychain and zsh dependencies.
* The workspace pin check warns rather than blocks — a hard stop on every folder change would be more disruptive than useful.
* Marketplace publishing is on the roadmap; today, installs come from `.vsix` files on GitHub Releases.
