Install Claude Code Globally via npm
Install Claude Code globally with npm:
npm install -g @anthropic-ai/claude-code
Then start it in any project directory:
cd ~/Code/my-project
claude
You can also run it with specific flags right from the start:
# Start with a specific model
claude --model claude-opus-4-6
# Continue the last conversation
claude --continue
# Run a one-shot command without opening an interactive session
claude -p "explain the auth system in this project"
To update to the latest version:
npm update -g @anthropic-ai/claude-code
Claude Code also ships as IDE extensions for VS Code and JetBrains — but the CLI is where the full power lives, with direct shell access, piping, hooks, and scripting support.
Install once, use everywhere — Claude Code follows you into any project directory.
Log in to leave a comment.
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.
Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.