man claude-code
The complete guide to Anthropic's CLI for building software with Claude.
# What is Claude Code?
Claude Code is Anthropic's official CLI tool for building software with Claude directly in your terminal. It brings agentic AI capabilities to your development workflow, allowing Claude to read your codebase, understand context, plan changes, and execute them — all from the command line.
Unlike traditional code completion tools, Claude Code operates as an autonomous agent. It can navigate your project structure, understand architectural patterns, create and modify files, run tests, and even fix its own errors — making it a true AI pair programmer.
./install.sh
# Install globally with npm
npm install -g @anthropic-ai/claude-code
# Navigate to your project
cd your-project
# Start Claude Code
claude
Requires Node.js 18+ and an Anthropic API key or active Claude Pro/Team subscription.
claude /help
cat CLAUDE.md
The CLAUDE.md file is a special project configuration file that Claude Code reads automatically when starting a session. It acts as persistent context, telling Claude about your project's tech stack, conventions, and preferences.
Place it in your project root. Claude will follow these instructions across every session — no need to repeat yourself.
# My Project
## Tech Stack
- Next.js, TypeScript, Tailwind CSS
## Conventions
- Use App Router
- Prefer server components
- Import paths use @/ alias
## Testing
- Use Vitest for unit tests
- Run: npm run test
tmux split-window -h
One of the most powerful patterns with Claude Code is running multiple instances simultaneously. Each instance maintains its own conversation context, allowing you to parallelize your development workflow.
Use three terminals for maximum productivity: one for high-level planning, one for active feature development, and one for tests and debugging.
# Terminal 1 — Architecture & Planning
claude --plan
# Terminal 2 — Feature Development
claude
# Terminal 3 — Tests & Debugging
claude
TIP:
Use a terminal multiplexer like tmux or Warp to manage multiple panes efficiently. This mirrors how professional developers at Anthropic use Claude Code in production.
cat ./resources.txt
Official Documentation
- Claude Code Documentation — Official guide and reference
- Anthropic API Docs — Full API documentation
- Anthropic Cookbook — Code examples and patterns
- TypeScript SDK — Official TypeScript/JavaScript SDK