Claude Code Installation Guide (Global npm Install)
If you haven't installed Claude Code yet, complete this step first. Once the installation is done, continue with the CC-Switch or Manual Configuration tutorials.
Installation Steps
1. First confirm Node.js is installed on your machine
Claude Code depends on Node.js. Node.js 18 or later is recommended. Run the following commands in your terminal to check:
node -v
npm -v2. Install Claude Code globally
Run the following command in your terminal to globally install the official Claude Code CLI:
npm install -g @anthropic-ai/claude-codeDon't use sudo
Do not use sudo npm install -g, otherwise you're likely to run into permission issues later.
3. Verify the Claude Code installation
After installation, run the commands below. If the version number prints correctly or the interactive interface opens, the installation succeeded:
claude --version
claudeWhat's next?
If Claude Code is already installed but not yet connected to NextHub, continue with the CC-Switch tutorial or the Manual Configuration tutorial.