Official CLI Integration

Unleash HacxGPT in Claude Code

Claude Code is an official agentic tool from Anthropic that lives right in your terminal. It understands your entire codebase, runs terminal commands, and can code entire features automatically.

By modifying a single configuration file, you can bypass Anthropic's billing and route the CLI to use our blazing-fast HacxGPT custom models (like hacxgpt-lightning-1.1 and ninja-red).

Before you start: Grab your API Key

You need your personal HacxGPT API key to make this work.🔑 Where is my key?Check your DMs (Direct Messages) with our team! We securely sent your personal key to you there. Keep it ready for Step 4.

1

Install Claude Code

If you haven't installed the official CLI yet, open your terminal (Command Prompt/PowerShell on Windows, or Terminal on Mac) and run the installer for your operating system.

irm https://claude.ai/install.ps1 | iex

💡 PRO TIP: Once installed, do not run claude auth login! Our proxy handles authentication for you, so you can skip Anthropic's login entirely.

2

Open the Settings File

Claude Code hides its settings file deep in your system. Here is the absolute easiest way to open it, no matter your skill level:

Windows Users

  1. Press Win + R on your keyboard.
  2. Paste the following exact path:
  3. %USERPROFILE%\.claude\settings.json
  4. Hit Enter. Choose Notepad to open it.

Mac & Linux Users

  1. Open your Terminal application.
  2. Copy and paste this command:
  3. nano ~/.claude/settings.json
  4. Press Enter to edit the file.

*If you get a "file not found" error, type claude in your terminal once just to let it initialize, close it, and try again.

3

Paste the HacxGPT Configuration

Delete everything currently inside that file (if anything is there). Then, copy the JSON code below and paste it in. This overrides Anthropic's defaults and injects HacxGPT's model stack.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.hacxgpt.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "hk-proj-{key}",
    "API_TIMEOUT_MS": "3000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "ANTHROPIC_MODEL": "hacxgpt-lightning-1.1",
    "ANTHROPIC_SMALL_FAST_MODEL": "hacxgpt-lightning-1.1",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "hacxgpt-lightning-1.1",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "hacxgpt-ninja-red",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "hacxgpt-lightning-1.1"
  },
  "model": "opus[1m]",
  "autoUpdatesChannel": "latest"
}
4

Insert Your Secret Key

Look at line 4 in the code you just pasted. You need to replace {key} with the exact API key you got from your DMs.

WRONG (Don't leave the brackets):
"ANTHROPIC_AUTH_TOKEN": "hk-proj-{1a2b3c4d5e}"
CORRECT:
"ANTHROPIC_AUTH_TOKEN": "hk-proj-1a2b3c4d5e"
5

Save & Launch! 🚀

Save the file (Ctrl + S on Windows or Ctrl + O then Enter in Nano).

You are ready to go! Open your project folder in your terminal and type:

claude

Claude Code will now awaken in your terminal, fully powered by HacxGPT. Try asking it to "build a snake game in Python" or "explain my project"!