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

# CC Switch

> Manage and switch Hostlinku providers, models, and API keys for Claude Code, Codex CLI, and OpenCode visually via the CC Switch desktop app (macOS, Windows, Linux).

[CC Switch](https://github.com/farion1231/cc-switch) is an open-source, cross-platform
desktop application (macOS, Windows, Linux) for managing the configuration of **Claude Code**, **Codex CLI**, and
**OpenCode** configurations from a single graphical interface. Instead of manually editing `~/.claude/settings.json` or
`~/.codex/config.toml` manually, you can save your Hostlinku provider profile, fetch
an automatic list of models from `/v1/models`, and switch between models/keys with just one click (or from the
*system tray* icon).

## Install CC Switch

Select the installation method based on your operating system:

**macOS (Homebrew):**

```bash theme={null}
brew tap farion1231/ccswitch
brew install --cask cc-switch
```

Or download the `.dmg` / `.tar.gz` file from
[GitHub Releases](https://github.com/farion1231/cc-switch/releases).

**Windows:**

Download the installer `CC-Switch-v*-Windows.msi` or the portable `.zip` version from
[GitHub Releases](https://github.com/farion1231/cc-switch/releases).

**Linux:**

```bash theme={null}
# Arch Linux (AUR)
paru -S cc-switch-bin
```

For Ubuntu/Debian/Fedora and other distributions, download the `.deb`, `.rpm`, or `.AppImage` package from
[GitHub Releases](https://github.com/farion1231/cc-switch/releases).

***

## One-click quick import (Deep Link)

CC Switch supports the `ccswitch://v1/import` protocol. After CC Switch is installed, run the
following command in the terminal (or open the URL in a browser) to automatically fill out the Hostlinku provider form
—all you need to do is paste the `sk-…` API key into the confirmation dialog.

**Import the Hostlinku preset for Claude Code:**

```bash theme={null}
# macOS: open "ccswitch://..." | Linux: xdg-open "ccswitch://..." | Windows: start "" "ccswitch://..."
open "ccswitch://v1/import?resource=provider&app=claude&name=Hostlinku&homepage=https%3A%2F%2Fhostlinku.com&endpoint=https%3A%2F%2Fapi.hostlinku.com&model=claude-sonnet-4-6&haikuModel=deepseek-v4-1-flash&sonnetModel=claude-sonnet-4-6&opusModel=claude-opus-4-6"
```

**Import the Hostlinku preset for Codex CLI:**

```bash theme={null}
open "ccswitch://v1/import?resource=provider&app=codex&name=Hostlinku&homepage=https%3A%2F%2Fhostlinku.com&endpoint=https%3A%2F%2Fapi.hostlinku.com%2Fv1&model=gpt-5-5"
```

***

## Connect Claude Code via CC Switch

### Create an API key in the Console

Go to [console.hostlinku.com](https://console.hostlinku.com) → **API Keys**, create a new key (e.g.,
`cc-switch-claude`), then copy the `sk-…` value.

### Add a provider in the Claude tab

1. Open the **CC Switch**, then select the **Claude** app from the top bar.
2. Click the **+** button (*Add Provider*) in the upper right, then select **Custom Configuration**.
3. Fill in the following main fields:

| Field | Value |
| - | - |
| **Provider Name** | `Hostlinku` |
| **Website URL** | `https://hostlinku.com` |
| **API Key** | `sk-your-api-key` |
| **Request URL (Base URL)** | `https://api.hostlinku.com` |
| **API Format** | `Anthropic Messages (Native)` |

### Fill in or pull the automatic model list

Click the **Auto-Fetch Models** button in the model configuration section. CC Switch will call
`GET https://api.hostlinku.com/v1/models` using your API key and display all models
available for that Service Mode key.

Or fill in the manual with the recommended combinations:

| Claude Code Model Slot | Hostlinku Slug Recommendations | Notes |
| - | - | - |
| **Default Model** | `claude-sonnet-4-6` | Main coding session model. |
| **Opus Model** | `claude-opus-4-6` | For planning (*plan mode*) & major refactoring. |
| **Sonnet Model** | `claude-sonnet-4-6` | Daily code execution. |
| **Haiku (Fast) Model** | `deepseek-v4-1-flash` or `claude-haiku-4-5` | Background on sub-agents & cost-saving summary. |

### Enable provider

Click **Add**, then click **Enable** on the **Hostlinku** card (or select it from the *system tray* menu).
CC Switch automatically writes the `env` block to `~/.claude/settings.json`. Open a new terminal and run
`claude`—type `/status` to ensure that `ANTHROPIC_BASE_URL` points to
`https://api.hostlinku.com`.

***

## Connect the Codex CLI via the CC Switch

### Select the Codex tab and add a provider

1. In CC Switch, select the **Codex** app from the top bar.
2. Click **+** (*Add Provider*) → **Custom Configuration**.
3. Fill in the following configuration:

| Field | Value |
| - | - |
| **Provider Name** | `Hostlinku` |
| **API Key** | `sk-your-api-key` |
| **Endpoint (Base URL)** | `https://api.hostlinku.com/v1` |
| **Model** | `gpt-5-5` (or `gpt-6-astra`, `gpt-6-sol`) |

Make sure that in the preview of the `config.toml` at the bottom, the `wire_api` field is set to `"responses"`:

```toml theme={null}
model = "gpt-5-5"
model_provider = "hostlinku"

[model_providers.hostlinku]
name = "Hostlinku"
base_url = "https://api.hostlinku.com/v1"
wire_api = "responses"
```

### Enable and run Codex

Click **Add** then **Enable** on the **Hostlinku** card. CC Switch automatically updates
`~/.codex/config.toml` and saves the API key in `~/.codex/auth.json`. Run `codex` in the terminal
to get started.

Separate profiles by Service Mode

You can create three different provider cards in CC Switch—for example, **Hostlinku (Performance)**,
**Hostlinku (Economy)**, and **Hostlinku (Dedicated)**—each with its corresponding API key.
When you want to switch from economy mode to high-speed mode, simply click the desired card in CC Switch
without touching the terminal.

Detect environment variable conflicts

If you’ve previously written `export ANTHROPIC_BASE_URL` or `export OPENAI_API_KEY` in
`~/.zshrc` / `~/.bashrc`, CC Switch will display a yellow warning banner because shell variables
may override or conflict with the GUI configuration. Remove the old `export` lines from your shell profile file
and then restart the terminal for the CC Switch settings to take full effect.

## Troubleshooting

| Symptoms | Causes & Solutions |
| - | - |
| The CC Switch setting has no effect in Claude Code | There are still Anthropic OAuth login sessions or `ANTHROPIC_*` variables in `~/.zshrc`. Run `/logout` inside `claude` and clear the old exports in the shell. |
| The *Auto-Fetch Models* button failed | Ensure that the **Request URL** is set to `https://api.hostlinku.com` (without double slashes) and that the **API Key** is entered correctly. |
| Codex rejects shell tools once enabled | The model selected in the Codex tab must be a `gpt-*` model that is *Responses-native* (such as `gpt-5-5`, `gpt-6-astra`, `gpt-6-sol`). Do not select non-OpenAI models or `gpt-5-6-terra` for Codex. |
| `400 not available in Service Mode` | The selected model is not active for that Service Mode API key. Use the **Auto-Fetch Models** button to display only models that match that key. |

Related guides: [Claude Code](https://docs.hostlinku.com/en/integrations/claude-code.md) · [Codex](https://docs.hostlinku.com/en/integrations/codex-cli.md) ·
[DeepSeek Harness](https://docs.hostlinku.com/en/integrations/deepseek-harness.md) · [OpenCode](https://docs.hostlinku.com/en/integrations/opencode.md).


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