Claude Code
Claude Code is Anthropic's official command-line coding agent, using the Anthropic Messages protocol. NovaAPI is compatible with this protocol — just point the endpoint at NovaAPI. This guide starts from scratch and covers Windows / macOS / Linux.
Requirements
- Node.js 18 or newer (Claude Code ships via npm)
- OS: Windows 10+ / macOS / Linux
- An API Key from the NovaAPI console (starts with
sk-)
1. Prepare the Node.js environment
Check whether it's already installed:
node -vIf it prints v18 or higher, skip to step 2. Otherwise install it for your OS.
Windows
Option A (recommended, winget):
winget install OpenJS.NodeJS.LTSOption B: open https://nodejs.org, download the LTS .msi installer, run it, and keep "Add to PATH" checked.
Reopen your terminal (PowerShell) and verify:
node -v
npm -vmacOS
Option A (recommended, Homebrew):
brew install nodeIf Homebrew isn't installed yet:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Option B: download the .pkg installer from https://nodejs.org.
Verify: node -v
Linux
Debian / Ubuntu (NodeSource LTS):
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejsFedora / RHEL / CentOS:
sudo dnf install -y nodejsArch:
sudo pacman -S nodejs npmVerify: node -v
Cross-platform option: use nvm to manage Node versions (
nvm install --lts). On Windows, use nvm-windows.
2. Install Claude Code
npm install -g @anthropic-ai/claude-codeVerify:
claude --versionPermission troubleshooting
Windows: if the global install throws
EACCES/permission errors, reopen PowerShell as Administrator and retry.macOS / Linux: avoid
sudo npm. On permission errors, use a user-level global prefix:bashmkdir -p ~/.npm-global npm config set prefix ~/.npm-global echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc # bash users: ~/.bashrc source ~/.zshrc
3. Point it at NovaAPI
Claude Code uses the Anthropic protocol — two environment variables point it at NovaAPI.
macOS / Linux (bash / zsh)
export ANTHROPIC_BASE_URL="https://api.novaapis.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-NovaAPI-key"To persist, add both lines to ~/.zshrc (zsh) or ~/.bashrc (bash), then source it.
Windows PowerShell
# Persist (takes effect after reopening the terminal)
setx ANTHROPIC_BASE_URL "https://api.novaapis.com"
setx ANTHROPIC_AUTH_TOKEN "sk-your-NovaAPI-key"
# Current session only
$env:ANTHROPIC_BASE_URL="https://api.novaapis.com"
$env:ANTHROPIC_AUTH_TOKEN="sk-your-NovaAPI-key"⚠️ Set
ANTHROPIC_BASE_URLto the domain only — do not append/v1. Claude Code adds/v1/messagesautomatically.
Pick models (optional)
export ANTHROPIC_MODEL="claude-sonnet-4-5"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5"Use the model names actually offered by NovaAPI; see the model list.
4. Run
From your project directory:
claudeThe first run opens the interactive UI — just start chatting.
5. Persistent config (optional, cross-platform)
To avoid setting variables each time, write a config file:
- macOS / Linux:
~/.claude/settings.json - Windows:
%USERPROFILE%\.claude\settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.novaapis.com",
"ANTHROPIC_AUTH_TOKEN": "sk-your-NovaAPI-key",
"ANTHROPIC_MODEL": "claude-sonnet-4-5"
}
}