Recently, AI CLIs have been getting more and more popular. Gemini has its own CLI, Claude has Claude Code, and OpenAI also offers Codex-related tools—so you can say the “Big Three” are all jumping into the game. If you look at AI coding now, people are no longer satisfied with just “chatting about a bit of code in a web page”; instead, more and more want to deeply integrate AI into their own projects and build personalized workflows.
I’ve tinkered with all these tools myself lately, and my final conclusion: if you’re going to use one, use the best—so I highly recommend Claude Code here. It’s not that the others aren’t good, but using Claude Code together with Claude is just too powerful.
First, a quick note on the demo environment for this article: I’m using a Mac so the screenshots below may look a bit different for you. If you’re on Windows or Linux, don’t worry—the core installation logic and verification methods are basically the same.
What is Claude Code?
Before we begin, let me briefly introduce what Claude Code is. Essentially, Claude Code is an official command-line coding assistant offered by Claude. You can launch it directly inside a project directory, and it works around your current repository, file structure, and terminal environment.
The biggest difference from chatting on a website is that it can be tailored for actual development scenarios. With Skills and MCP, there are more ways to use it, making your coding process much smoother.
This tutorial just covers the basics—installation, setup, and some pitfalls I encountered. If you want a deep dive into each of the Big Three’s CLI tools, I’d strongly suggest starting with their official documentation to understand key commands and concepts.
For a guide to activating Claude Pro, see: Claude Pro Credit Card Frequently Declined? Use N26 + Apple Pay for a Smooth Upgrade (Step-by-Step Tutorial)
Basic Checks
Before installing, don’t rush to just copy my commands and get started right away.
First, check the most basic environment requirements:
node -v
npm -v
According to Anthropic’s official docs, Claude Code now requires Node.js 18+. If node or npm don’t exist, or are too old, I recommend installing the required versions first before moving on to Claude Code.
If you don’t know how to use nvm, check this guide: NVM Install Tutorial

Installation Commands
Actually, the installation commands are almost identical for Win, Mac, and Linux, but there are always some pitfalls with specific environments and setups—I’ve run into plenty, so I’ve documented them here.
Universal Installation Command
The most common and officially recommended way is:
npm install -g @anthropic-ai/claude-code
If you don’t want to touch npm global permissions, you can try the official installation script on macOS, Linux, or WSL environments:
curl -fsSL https://claude.ai/install.sh | bash
After installation, verify with:
claude --version
If you see a version number, the command is installed.
Note: After installation, verify the command first—don’t jump straight to authentication and workflow.

What to Know for macOS
Macs are usually the easiest. You can install directly in Terminal, and after installing, remember to open a new Terminal window and then run claude --version.
A common mistake is continuing in the same window after installing and getting an error that the command can’t be found. It’s just that the terminal session hasn’t refreshed. Don’t stress thinking it didn’t install—no need to pull your hair out.
What to Know for Windows
The biggest issue on Windows isn’t usually the command itself, but mixing up your terminal environments.
According to Anthropic’s docs, Windows currently supports:
-
WSL 1 / WSL 2
-
Git for Windows
If you frequently code, I recommend using WSL directly. If you just want to try it, Git Bash is fine. Don’t keep switching between cmd, PowerShell, and Git Bash. If you’re not in the right terminal, you’ll hit problems and blame Claude Code for everything.
So for Windows users, if you still can’t find claude after installing, check first:
-
Did you install it in the correct terminal environment?
-
Did you fully restart your terminal?
-
Are Node, npm, and claude all from the same installation in your current environment?
I definitely recommend using the NVM plugin method for your node environment, so you can manage multiple versions.
What to Know for Linux
If you use a mainstream distro like Debian or Ubuntu, just run the commands and it should work.
If you’re on something specialized, like Alpine, Anthropic’s docs mention you might need to install extra dependencies, such as:
-
libgcc -
libstdc++ -
ripgrep
Testing and Verification
Once you’ve installed and see the version number, you can start using Claude Code. I recommend organizing your Claude Code projects by folders, so you can structure different workflows and plugins for each project.
Enter your project directory:
cd your-project
claude
Usually this will automatically bring up authentication, but if not, you can enter the /login command manually.
According to Anthropic’s docs, common authentication methods for Claude Code include:
-
Anthropic Console
-
Pro/Max Subscription for the Claude App
-
Amazon Bedrock
-
Google Vertex AI
At this step, as long as you confirm that it launches, authenticates, and enters the interactive interface, you’re good.
Honestly, the hardest part is keeping your Claude account alive, because Anthropic’s bans are just so unpredictable—there really aren’t any rules you can count on.

Most Common Pitfalls
1. Entering claude shows command not found
First check if Node and npm are working, then see if the terminal has been restarted after install. Windows users should triple-check they’re not in the wrong shell.
2. Stuck on authentication or network issues after launching
At this point, don’t waste time on the installation commands—installation is done. You should now check your authentication method and network environment. The worst case is when you see an error about your country not being supported—that means, “congrats,” your account is gone and you should apply for a refund
.
Summary and Suggestions
All three CLI tools from the Big Three are pretty good, and Claude Code is probably the best of the bunch, but the main issue is it isn’t stable and accounts get banned easily.
If you just can’t use Claude or Anthropic’s risk controls are driving you crazy, don’t worry—my next post will cover how to use CC Switch with the domestic model MiniMax to run Claude Code, so you have an alternative.
If that doesn’t work, you can settle for Codex or Gemini’s CLI. Hope your accounts stay alive and that your experience keeps getting better!
VPS Monitoring: https://legacyvps.com/scanidc
Overseas Payment Sharing: https://easypaylog.com
Family Heirloom VPS: https://legacyvps.com
TG Discussion Group: https://t.me/legacyvps