Skip to main content

1. Install Claude Code

Local Installation

Install via npm

Requires Node.js 18 or later

2. Configure the Harogo API

To connect to Harogo’s model service through the Anthropic-compatible API, set the following environment variables.
  1. Set ANTHROPIC_BASE_URL to https://api.harogo.ai/
  2. Set ANTHROPIC_AUTH_TOKEN to the API key you got from the Harogo platform
  3. Set ANTHROPIC_MODEL to a Claude model supported by Harogo, for example claude-sonnet-5.
  1. Run the following command in your terminal to check your default shell.
  1. Set the environment variables based on your shell type:
  1. Run the following command in your terminal to apply the environment variables.
  1. Open a new terminal and run the following commands to confirm the environment variables took effect.
If you’re going to manage Claude Code through CC Switch, we recommend not also setting global ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, or ANTHROPIC_MODEL values. System- or user-level environment variables can override the provider config CC Switch writes, so the UI shows the correct provider selected while Claude Code is still actually running on an old key or model.

3. Verify the Configuration

After setting up environment variables or CC Switch, send one minimal request first to confirm the key, model, and Anthropic-compatible endpoint are all working, before starting a longer session.

4. Start Using Claude Code

Once configured, go to your working directory and run the claude command in your terminal to get started.
If you see Not logged in · Please run /login on startup, or you’re dropped into the Anthropic login flow, it usually means Claude Code didn’t pick up a working Harogo configuration, or first-time onboarding hasn’t been completed. First confirm the minimal request from the previous step returns 2, and check whether ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, or ANTHROPIC_MODEL are being overridden by old global environment variables. Once you’ve confirmed the key works, if you’re still sent to the login flow, you can skip first-time onboarding with the steps below: Terminal showing the login-or-continue prompt on Claude Code's first launch
  1. Locate the .claude.json file in your home directory:
    • macOS / Linux: ~/.claude.json
    • Windows: C:\Users\%USERNAME%\.claude.json
  2. Set the hasCompletedOnboarding field to true
  1. Save the file, then run claude again in your terminal.

(Optional) More Ways to Configure the Model

Claude Code supports the following ways to configure the model, listed from highest to lowest priority — a higher-priority setting overrides a lower-priority one.
  1. During a conversation: run the /model <model-name> command to switch models. Good for a one-off switch.
  1. When starting Claude Code: run claude --model <model-name> to specify a model. Good for a single session.
  1. Set environment variables: configure different tiers of models by task complexity, and Claude Code will automatically pick the right one for the task. Applies globally.
Where:
  • ANTHROPIC_DEFAULT_OPUS_MODEL: for complex reasoning, architecture design, and other high-difficulty tasks.
  • ANTHROPIC_DEFAULT_SONNET_MODEL: for writing code, implementing features, and other everyday tasks.
  • ANTHROPIC_DEFAULT_HAIKU_MODEL: for syntax checks, file search, and other simple tasks.
  1. Set permanently in settings.json: write the model configuration into Claude Code’s user config file (e.g. ~/.claude/settings.json, or C:\Users\%USERNAME%\.claude\settings.json on Windows) or into a project-level config, for a permanent user-level or project-level setting.

Configuring via CC Switch

  1. Launch CC Switch, select Claude Code on the left, then click “Add Provider.”
Add Provider entry point on the CC Switch home screen
  1. From the preset list, choose “Custom Configuration” as the provider.
Selecting AiHubMix in the CC Switch provider preset list
  1. Fill in the provider name, API key, and endpoint (https://api.harogo.ai), etc. Once everything is filled in, click “Add.”
Entering the API key on the CC Switch AiHubMix configuration form
  1. Back on the home screen, select “harogo” from the provider list and click “Use.”
Selecting AiHubMix and clicking Launch on the CC Switch home screen
Checking model configuration with the status and models commands in the Claude Code terminal
I Shot 2026 08 07 17 04 52
Tip: once Claude Code is open in your terminal, type /status to check the model ID, or /models to pick another configured model.
If CC Switch shows “System environment variable conflict detected,” deal with ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, and ANTHROPIC_MODEL first. These global variables override the current provider config — a placeholder value like ANTHROPIC_AUTH_TOKEN=AIHUBMIX_API_KEY will cause authentication to fail outright. Once you’re sure you no longer need the global variables, remove the conflicting entries in CC Switch, or manually delete the system/user environment variables and restart your terminal.