Check Environment (Install CLI)
Before configuring Claude Code or Codex manually, install their command-line tools. This page is the shared preparation step for the manual route.
If you'd rather save effort, switch to CC-Switch One-Click Setup.
(1) Confirm your Node.js environment
Run in a terminal:
npm list -g --depth=0If it runs normally (it's fine if nothing is listed), Node.js / npm are available; if you see "command not found", install the LTS version from the Node.js website first, reopen your terminal, and try again. See Check Environment for details.
(2) Install the CLIs
Install the CLIs you need in one go in the terminal:
npm i -g @anthropic-ai/claude-code@latest
npm i -g @openai/codex@latest(3) Test the install and generate config directories
This step matters
Only after running each command for the first time will the CLI config directories (.claude, .codex) be generated in your home directory — and only then will there be files to edit later.
claude
# If an interface or options appear, the install succeededcodex
# If an interface or options appear, the install succeededIf claude errors on first run, reports it can't connect, or asks you to log in, see FAQ · Claude Code.
