A powerful AI programming assistant for your terminal
Claude Code is a powerful AI programming assistant that allows you to collaborate with AI directly in your terminal. This guide will walk you through the installation and configuration process.
💡 Tip: If you already have Node.js 18.0 or higher installed, you can skip this step.
# Install Node.js LTS version
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
# Install Xcode command line tools
sudo xcode-select --install
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node.js via Homebrew
brew install node
# Verify installation
node --version
Install Claude Code globally using npm:
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version
A: This indicates that Claude Code did not detect the environment variables. Please check:
ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL are correctly setsk-)A: Claude Code determines network status by connecting to Google. Showing "offline" does not affect normal use, it just indicates that it cannot connect to Google.
A: Claude Code needs to call Claude service for security checks before accessing web pages. You need:
A: This may be caused by network environment issues. Solutions:
A: This may be caused by unstable forwarding proxy. Suggestions:
claude commandA: Try clearing the site's cookies, then log in again.
💡 Tip: If you encounter other issues, please check the official documentation or contact technical support.