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

# Claude Code

> Connect Claude Code to your downloaded Magnitude models.

## Connect

1. [Install Claude Code](https://code.claude.com/docs/en/overview) if needed.
2. Download a compatible model in Magnitude.
3. Open **Connections → Claude Code** and click **Connect**.
4. Select a downloaded model on the connected card, then click the command to copy it.
5. Paste it into your terminal from your project folder. On Windows, use PowerShell.

Magnitude configures Claude Code’s gateway. Local model IDs use the `anthropic-local/` prefix. Keep Magnitude running while connected, including for hosted models: hosted requests still go to their provider through the gateway. Disconnect and restart Claude Code before using it independently again.

If Claude Code isn’t signed in, **Connect** also adds a placeholder credential, and Magnitude serves every request from it with your loaded model, including the Claude models that built-in subagents ask for. If you sign in to Claude Code later, connect again so your own login is used for Claude models.

## Run Claude Code

After connecting in Magnitude, start Claude Code with:

```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude --model anthropic-local/MODEL_ID
```

Replace `MODEL_ID` with the exact model ID, such as `gemma-4-e2b-it-qat:gguf:q4`, rather than its display name. The command shown in **Connections** already includes the correct ID for your selected model, so you can copy it without editing. Keep Magnitude running; it loads the model when the agent requests it.

## Configuration

**Connect** writes `~/.claude/settings.json`. Location overrides: `CLAUDE_CONFIG_DIR`.

### On another computer

1. In Magnitude, turn on **Settings → Network access**.
2. On the other computer, open `http://ADDRESS:10100` in a browser, using the address from **Reachable at**, and sign in with the **API key**.
3. In **Connections**, click **Copy setup prompt** on Claude Code and send it to your agent.

### Edit the files yourself

Use the address from **Reachable at** for `ADDRESS` and the **API key** for `API_KEY`.

`~/.claude/settings.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "env": {
    "ANTHROPIC_BASE_URL": "http://ADDRESS:10100/inference/anthropic/proxies/claude-code",
    "ANTHROPIC_AUTH_TOKEN": "API_KEY",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
  },
  "model": "anthropic-local/MODEL_ID"
}
```

Only local models are available from another device.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.