Claude Code Installation

Install Claude Code in VS Code and configure it as an OpenAI-compatible interface via CTOK for quick setup with team intranet or self-hosted relay.

Install Node.js (Skip if already installed)

bash
# Ubuntu / Debian users
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs
node --version

# macOS users
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node --version

Ensure Node.js version ≥ 18.0
Tip: If you have previously installed other local relay/proxy tools that occupy the same port, it may cause conflicts. It is recommended to disable or uninstall them before continuing.

If you have installed other relay client CLI, remember to uninstall first (Optional)

Step 1: Check installation location

bash
# Check if installed in local project
npm ls @anthropic-ai/claude-code
# Check if installed globally
npm ls -g @anthropic-ai/claude-code

Step 2: Execute uninstall operation

bash
# Uninstall locally installed package
npm uninstall @anthropic-ai/claude-code
# Uninstall globally installed package
npm uninstall -g @anthropic-ai/claude-code

Install Claude Code

bash
npm install -g @anthropic-ai/claude-code
claude --version

Get Started

Get Auth Token: In the personal center (please regenerate if using for the first time), format like: "i7-relay-xxxxxxxxxxxxxx" API URL: ANTHROPIC_BASE_URL: Your connection point URL is the API service address of this site, same as the main site address
Run in your project directory:

bash
cd your-project-folder
export ANTHROPIC_AUTH_TOKEN=i7-relay-xxxxxxxxxxxxxx
export ANTHROPIC_BASE_URL="https://i7dc.com/api"
claude What large model are you

After running: Choose your favorite theme + Enter to confirm security notice + Enter to use default Terminal configuration + Enter to trust working directory + Enter Start coding with your AI programming partner in the terminal! 🚀

export ANTHROPIC_BASE_URL="https://i7dc.com/api"
export ANTHROPIC_AUTH_TOKEN="your-key"
cd your-project-folder
claude

To avoid repetitive input, you can write environment variables to bash_profile and bashrc:

For Mac or Linux, write to configuration files:

Mac/Linux
echo -e '\n export ANTHROPIC_AUTH_TOKEN=your-key' >> ~/.bash_profile
echo -e '\n export ANTHROPIC_BASE_URL=connection-point-url' >> ~/.bash_profile
echo -e '\n export ANTHROPIC_AUTH_TOKEN=your-key' >> ~/.bashrc
echo -e '\n export ANTHROPIC_BASE_URL=connection-point-url' >> ~/.bashrc
echo -e '\n export ANTHROPIC_AUTH_TOKEN=your-key' >> ~/.zshrc
echo -e '\n export ANTHROPIC_BASE_URL=connection-point-url' >> ~/.zshrc

After restarting the terminal, use directly:

Mac/Linux
cd your-project-folder
claude

VSCode Claude Code Plugin Forced Login Workaround

The new version of Claude Code plugin requires forced login. You can bypass it using the following method:

Step 1: Create Configuration File

mkdir -p ~/.claude && touch ~/.claude/config.json

Step 2: Edit Configuration File

nano ~/.claude/config.json

Step 3: Enter Configuration Content

In the opened editor, enter the following content:

{
  "primaryApiKey": "i7relay"
}
After saving the file, restart VSCode to use the Claude Code plugin.
Bring endless innovation and opportunities with AI
About
Features
Docs
Pricing
Contact us
Terms & Policies
Terms of Use
Privacy Policy
Specified Commercial Transactions Act