Claude Code — Agentic Coding CLI by Anthropic
Claude Code — Agentic Coding CLI
Section titled “Claude Code — Agentic Coding CLI”Claude Code is Anthropic’s terminal-based AI coding agent. Unlike IDE plugins that add AI to your existing editor, Claude Code operates in your terminal — reading your files, running shell commands, editing code, and committing changes, all driven by natural language instructions.
How It Works
Section titled “How It Works”You run claude in your terminal, describe what you want, and Claude Code:
- Reads relevant files in your codebase
- Plans what needs to change
- Makes edits across multiple files
- Runs tests or build commands to verify changes
- Fixes errors if tests fail
- Commits and describes the changes
All while keeping you in control — you can see every action and approve or reject changes.
Installation
Section titled “Installation”# Install via npm (requires Node.js 18+)npm install -g @anthropic-ai/claude-code
# Verify installationclaude --version
# Start a session in your project directorycd my-projectclaudeKey Capabilities
Section titled “Key Capabilities”| Capability | Example |
|---|---|
| Read codebase | Understands your entire project structure |
| Write + edit files | Creates and modifies files |
| Run commands | Executes shell commands, tests, builds |
| Git operations | Stages files, creates commits, reads diffs |
| Web search | Looks up documentation when needed |
| Multi-turn context | Remembers the full conversation and file state |
Common Workflows
Section titled “Common Workflows”Fix a Bug
Section titled “Fix a Bug”claude "The login form is not validating the email format. Fix it and add a test."Claude Code will:
- Find the login form component
- Identify the missing validation
- Add the validation logic
- Write a unit test for it
- Run the test suite to confirm it passes
Add a Feature
Section titled “Add a Feature”claude "Add a dark mode toggle to the settings page. Persist the preference in localStorage."Refactor Code
Section titled “Refactor Code”claude "Refactor the UserService class to use dependency injection and write tests for each method."Understand the Codebase
Section titled “Understand the Codebase”claude "Explain how authentication works in this project and draw a flow diagram."Slash Commands
Section titled “Slash Commands”| Command | Description |
|---|---|
/help | Show available commands |
/clear | Clear conversation history |
/compact | Compact the conversation to save context |
/config | Open configuration settings |
/memory | View or edit persistent memory |
/review | Review recent changes |
CLAUDE.md — Project Instructions
Section titled “CLAUDE.md — Project Instructions”Create a CLAUDE.md file at the root of your project to give Claude Code persistent instructions:
# Project: MyApp
## Stack- Frontend: React + TypeScript- Backend: Node.js + Express- Database: PostgreSQL
## Conventions- Use functional components (no class components)- All functions must have JSDoc comments- Tests go in __tests__ folder next to the source file- Run `npm test` to verify changes
## Rules- Never commit .env files- Always run `npm run lint` before finishingClaude Code Cloud
Section titled “Claude Code Cloud”Claude Code Cloud allows Claude Code to run in a secure, sandboxed cloud environment — useful for:
- Running long tasks without keeping your terminal open
- Executing in CI/CD pipelines
- Sharing sessions with team members
Claude Code vs Cursor vs Windsurf
Section titled “Claude Code vs Cursor vs Windsurf”| Feature | Claude Code | Cursor | Windsurf |
|---|---|---|---|
| Interface | Terminal | IDE (GUI) | IDE (GUI) |
| Multi-file edits | Yes | Yes | Yes |
| Runs shell commands | Yes (core feature) | Yes (agent mode) | Yes (Cascade) |
| Git integration | Yes (native) | Yes | Yes |
| Model | Claude only | Claude, GPT-4o, Gemini | Claude, GPT-4o |
| Works in any editor | Yes (terminal) | VS Code fork only | VS Code fork only |
| Learning curve | Medium | Low | Low |
| Best for | Autonomous tasks | Visual AI editing | Fast AI editing |
Pricing
Section titled “Pricing”Claude Code requires a Claude Pro plan ($20/month) or API access. Usage is billed against your Anthropic API usage in API mode.
Useful Links
Section titled “Useful Links”- Claude Code Docs
- Claude Code GitHub
- Anthropic API
- Claude Chat — Browser-based chat