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

# Claude Code

Claude Code is Anthropic's terminal-based coding agent.

### Quick start

Install [Node.js 18 or later](https://nodejs.org/en/download/) before you begin.

Install Claude Code in the terminal:

```bash theme={null}
npm install -g @anthropic-ai/claude-code
```

Open Claude Code's local settings file to configure access through GeekAI:

```bash theme={null}
vi ~/.claude/settings.json
```

> [!NOTE]
>
> On Windows, create or edit `settings.json` in `%USERPROFILE%\.claude`. `%USERPROFILE%` is your user directory, such as `C:\Users\GeekAI` for the Windows user `GeekAI`.

In `settings.json`, enter:

```json theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://geekai.co/api",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_GEEKAI_API_KEY>"
  }
}
```

Replace `<YOUR_GEEKAI_API_KEY>` with your [GeekAI API key](https://geekai.co/user/api_keys). If you use [GeekAI International](https://geekai.dev/user/api_keys), use its endpoint and a key issued by that service instead:

```json theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://geekai.dev/api",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_GEEKAI_DEV_API_KEY>"
  }
}
```

> Do not append `/v1` to the base URL; doing so causes requests to fail.

The default balanced routing policy works for individual developers. For larger projects or faster responses, edit your key on the [API Keys page](https://geekai.co/user/api_keys) and select **Speed first**. This route supports caching and costs 40% of the official price.

![Selecting the speed-first routing policy for Claude Code](https://static.geekai.co/storage/2025/07/26/image-20250726120136412.png)

For smaller projects, you can reduce the cost to 20% of the official price by selecting the low-cost channel and keeping the **Speed first** policy:

![Selecting the low-cost channel for Claude Code](https://static.geekai.co/storage/2025/08/05/a1f62b917f0f9e7b7bcc4764ec4d26b.png)

Save the settings and launch Claude Code:

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

![Starting Claude Code for the first time](https://static.geekai.co/storage/2025/07/19/image-20250719162727039.png)

On first launch, press Enter to accept the setup prompts. At the interactive prompt, ask Claude for coding suggestions or help with a problem:

![Coding with Claude Code through GeekAI](https://static.geekai.co/storage/2025/07/19/image-20250719162812032.png)

### Customize Claude Code

You can add the following options to `env` in `settings.json`:

* `ANTHROPIC_MODEL`: Main model (default: `claude-sonnet-4-5-20250929`).
* `ANTHROPIC_SMALL_FAST_MODEL`: Model for background tasks (default: `claude-haiku-4-5-20251001`).
* `BASH_DEFAULT_TIMEOUT_MS`: Default timeout for long-running Bash commands.
* `BASH_MAX_TIMEOUT_MS`: Maximum timeout the model can request for a Bash command.
* `BASH_MAX_OUTPUT_LENGTH`: Maximum output length for a Bash command.
* `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR`: Return to the original working directory after each Bash command.
* `CLAUDE_CODE_MAX_OUTPUT_TOKENS`: Maximum number of tokens the model can generate.
* `HTTP_PROXY`: HTTP proxy server for network connections.
* `HTTPS_PROXY`: HTTPS proxy server for network connections.
* `MAX_THINKING_TOKENS`: Enforced token budget for thinking.
* `MCP_TIMEOUT`: MCP server startup timeout in milliseconds.
* `MCP_TOOL_TIMEOUT`: MCP tool execution timeout in milliseconds.
* `MAX_MCP_OUTPUT_TOKENS`: Maximum tokens allowed in an MCP tool response (default: 25000).

To manage global Claude Code settings:

* List settings: `claude config list`
* Read a setting: `claude config get <key>`
* Change a setting: `claude config set <key> <value>`

For example, set the theme:

```bash theme={null}
claude config set theme dark  # Dark theme
claude config set theme light # Light theme
```

To display full Bash command output:

```bash theme={null}
claude config set verbose true # Default: false
```

See the [official settings documentation](https://docs.anthropic.com/en/docs/claude-code/settings) for more options.

### Use third-party models

#### Kimi K2

After configuring GeekAI as your provider, use `/model` to switch to Kimi K2:

```bash theme={null}
/model kimi-k2-0711-preview
```

![Using Kimi K2 in Claude Code](https://static.geekai.co/storage/2025/08/22/image-20250822191806247.png)

#### DeepSeek V3.1

To switch to DeepSeek V3.1 through GeekAI, enter:

```bash theme={null}
/model deepseek-v3.1
```

![Using DeepSeek V3.1 in Claude Code](https://static.geekai.co/storage/2025/08/22/image-20250822185215040.png)

#### GLM 4.5

GeekAI also supports Zhipu's Claude Code-compatible GLM 4.5 series. Switch to GLM with:

```bash theme={null}
/model glm-4.5
```

![Using GLM 4.5 in Claude Code](https://static.geekai.co/storage/2025/09/05/image-20250905231320537.png)

> [!NOTE]
>
> `glm-4.5`, `glm-4.5-air`, and `glm-4.5-flash` all work in Claude Code.

#### Qwen3 Coder

To use Qwen3 Coder Plus through GeekAI, enter:

```bash theme={null}
/model qwen3-coder-plus
```

![Using Qwen3 Coder Plus in Claude Code](https://static.geekai.co/storage/2025/09/07/image-20250907003625796.png)

#### MiniMax M2

MiniMax M2 is designed for coding and agent tasks. It offers twice the speed at 8% of the price of Claude Sonnet, with a limited-time free offer.

```bash theme={null}
/model minimax-m2
```

![Using MiniMax M2 in Claude Code](https://static.geekai.co/storage/2025/10/29/image-20251029001512284.png)

### Use Claude Code in an IDE

In VS Code, install the Claude Code extension:

![Claude Code for VSCode](https://static.geekai.co/storage/2025/08/01/image-20250801102817642.png)

Click the Claude Code icon at the upper right of the editor to open the chat window:

![Opening Claude Code in VS Code](https://static.geekai.co/storage/2025/08/01/image-20250801103317069.png)
![Chatting with Claude Code in VS Code](https://static.geekai.co/storage/2025/08/01/image-20250801103657864.png)

The extension uses the Claude Code environment you configured in the terminal, so no additional setup is needed.


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