Documentation Index
Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt
Use this file to discover all available pages before exploring further.
Claude Code is Anthropic’s terminal-based coding agent. It lets you search codebases, edit files across multiple projects, and run agentic workflows directly from your terminal. When you set the ANTHROPIC_BASE_URL environment variable to point to Newapi, all Claude Code requests are routed through your Newapi instance.
Features
| Category | Capability |
|---|
| Code understanding | Deep codebase analysis; automatic high-level overviews |
| Code editing | Multi-file collaborative editing; project-pattern-aware suggestions |
| Integration | Runs in the terminal; integrates with VS Code and JetBrains IDEs |
| Code generation | Generates code, creates tests, fixes bugs from concept to commit |
| Security | Changes require explicit user authorization |
| Cross-platform | Supports Windows, macOS, and Linux |
Setup
1. Install Node.js
Claude Code requires Node.js to run on Windows.
- Visit https://nodejs.org/ and download the LTS version.
- Run the
.msi installer and follow the wizard with default settings.
Verify the installation by opening PowerShell and running:node --version
npm --version
Use PowerShell instead of CMD. If you encounter permission issues, run PowerShell as administrator. Some antivirus software may flag the installer — add an exception if needed.
2. Install Git Bash
Git Bash is required to install Claude Code on Windows. After installation, you can continue using PowerShell or CMD for day-to-day use.
- Visit https://git-scm.com/downloads/win and download the installer.
- Run the
.exe file with default settings.
Verify by opening Git Bash and running:3. Install Claude Code
Open PowerShell and run:npm install -g @anthropic-ai/claude-code
If prompted to add ~/.local/bin to your PATH, run:[Environment]::SetEnvironmentVariable('Path', ([Environment]::GetEnvironmentVariable('Path','User') + ";$HOME\.local\bin"), 'User')
Verify the installation:Run the one-click setup script to point Claude Code at your Newapi instance:iex (irm 'https://raw.githubusercontent.com/QuantumNous/new-api-docs/refs/heads/main/helper/claude-cli-setup.ps1')
The script prompts you for your Newapi base URL and API key, then writes the required environment variables (ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY) to your user profile.5. Start using Claude Code
Open PowerShell and launch Claude Code:To use Claude Code in a specific project:cd C:\path\to\your\project
claude
To select or change the active model, run inside Claude Code:After setting ANTHROPIC_BASE_URL, all Claude Code model requests (including officially preset models) route through your Newapi instance instead of Anthropic’s servers directly.
1. Install Claude Code
Open Terminal and run:curl -fsSL https://claude.ai/install.sh | bash
If prompted, add Claude Code to your PATH:echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Run the one-click setup script to point Claude Code at your Newapi instance:curl -fsSL https://raw.githubusercontent.com/QuantumNous/new-api-docs/refs/heads/main/helper/claude-cli-setup.sh | bash
The script prompts you for your Newapi base URL and API key, then writes them to your shell configuration file.Verify Claude Code is installed:3. Start using Claude Code
Launch Claude Code:To use Claude Code in a specific project:cd /path/to/your/project
claude
To select or change the active model, run inside Claude Code:After setting ANTHROPIC_BASE_URL, all Claude Code model requests route through your Newapi instance instead of Anthropic’s servers directly.
macOS troubleshooting
If macOS security settings prevent Claude Code from running:
- Open System Preferences → Security & Privacy.
- Click Open Anyway or Allow.
- Alternatively, run
sudo spctl --master-disable in Terminal.
1. Install Claude Code
Open Terminal and run:curl -fsSL https://claude.ai/install.sh | bash
If you encounter permission errors:sudo curl -fsSL https://claude.ai/install.sh | bash
Verify the installation:Run the one-click setup script to point Claude Code at your Newapi instance:curl -fsSL https://raw.githubusercontent.com/QuantumNous/new-api-docs/refs/heads/main/helper/claude-cli-setup.sh | bash
The script prompts you for your Newapi base URL and API key, then appends them to your shell configuration file (.bashrc or .zshrc).3. Start using Claude Code
Launch Claude Code:To use Claude Code in a specific project:cd /path/to/your/project
claude
To select or change the active model, run inside Claude Code:After setting ANTHROPIC_BASE_URL, all Claude Code model requests route through your Newapi instance instead of Anthropic’s servers directly.
Linux troubleshooting
Missing dependency librariesSome distributions require additional build tools:# Ubuntu/Debian
sudo apt install build-essential
# CentOS/RHEL
sudo dnf groupinstall "Development Tools"
Environment variables not taking effect
- Confirm you modified the correct file (
.bashrc or .zshrc).
- Restart your terminal or run
source ~/.bashrc.
- Verify with
echo $ANTHROPIC_BASE_URL.