Claude Code guide: setup, pricing, features and limits
Claude Code is a coding agent from Anthropic. It began as an internal tool, launched publicly as a research preview in February 2025 and became generally available in May 2025. In February 2026, Anthropic said Claude Code's run-rate revenue had passed $2.5 billion and had doubled since the start of the year, with enterprise use making up more than half of it.
This page covers how it works, how to set it up, what it costs and where it falls short.
How it works
You start Claude Code inside a project directory by typing claude. It opens an interactive session in the terminal. You describe a task, such as "add rate limiting to the login endpoint and write tests for it", and Claude Code works through it:
- It searches and reads the relevant files.
- It proposes or makes edits across as many files as the task needs.
- It runs commands: tests, linters, builds, git.
- It reads the output and keeps going until the task is done or it needs your input.
Every file edit and shell command appears in the session, and by default each one waits for your approval. You can interrupt at any point, correct the direction, or undo changes.
The same engine runs in several places. The terminal CLI has the full feature set and is the only surface that supports scripting and the Agent SDK. There are extensions for VS Code and JetBrains IDEs, a desktop app with a visual diff viewer, a web version that runs tasks in Anthropic's cloud and keeps going after you close the tab, and mobile access to those cloud sessions. Configuration, project memory and MCP servers are shared between the local surfaces.
Installing it
Anthropic recommends its native installer, which updates itself in the background:
| System | Command |
|---|---|
| macOS, Linux, WSL | curl -fsSL https://claude.ai/install.sh | bash |
| Windows PowerShell | irm https://claude.ai/install.ps1 | iex |
| Homebrew | brew install --cask claude-code |
| WinGet | winget install Anthropic.ClaudeCode |
Packages for apt, dnf and apk cover Debian, Fedora, RHEL and Alpine. The older npm package is deprecated. Supported systems are macOS 13 or later, Windows 10 1809 or later, Ubuntu 20.04 or later, Debian 10 or later and Alpine 3.19 or later, with at least 4 GB of RAM. On native Windows, Anthropic recommends installing Git for Windows so Claude Code can use Bash. Without it, Claude Code falls back to PowerShell.
Homebrew offers two channels. The claude-code cask follows the stable channel, which runs about a week behind and skips releases with major regressions. claude-code@latest gets each release as it ships.
After installing, run claude --version to check it worked, then claude inside a project to sign in.
Plans and cost
Claude Code needs one of these:
| Option | Price | Best for |
|---|---|---|
| Claude Pro | $20/month, or $17/month billed annually | Regular use with occasional limits |
| Claude Max 5x | $100/month | Daily use for most of the working day |
| Claude Max 20x | $200/month | Heavy, parallel or long-running use |
| Team and Enterprise | Per seat, set by Anthropic | Companies needing admin controls and commercial terms |
| Anthropic Console (API) | Pay per token | Automation, CI and occasional use |
| Bedrock, Google Cloud, Foundry | Your cloud provider's Claude rates | Teams that must keep usage inside an existing cloud account |
Subscription plans have usage limits that reset over rolling windows, and Max sells five or twenty times Pro's usage per session. On API billing, cost depends on how much code Claude Code reads and writes. Long sessions in large repositories use the most tokens. The /cost command and the usage settings show where you stand.
Features that change how you work
CLAUDE.md. A markdown file in your project root that Claude Code reads at the start of every session. Put your build and test commands, code style rules, architecture notes and things to avoid there. You can keep a personal one in your home directory and team ones in the repository. Claude Code also keeps automatic memory of what it learns about a project between sessions.
Permissions. Settings files control which tools and commands run without asking. A common setup allows read-only commands and your test runner, and asks for everything else. Plan mode lets Claude Code investigate and write a plan without editing anything, which helps on unfamiliar code.
Hooks. Shell commands that run at set points, such as after every file edit or before a commit. Teams use them to run formatters automatically, block edits to protected files or send notifications.
Skills and slash commands. Packaged instructions and scripts for repeatable work, such as /review-pr or a deploy checklist, which a team can share in the repository or through plugins.
MCP. Claude Code connects to Model Context Protocol servers, which give it access to issue trackers, databases, design files, documentation and internal APIs.
Subagents and parallel work. Claude Code can hand parts of a task to separate agents with their own context, and you can run several sessions in parallel or in the background.
Headless mode. claude -p "prompt" runs a single task and prints the result, so you can pipe logs into it, call it from scripts, or run it in GitHub Actions or GitLab CI for code review and issue triage.
Where it works well
- Multi-file changes such as adding a feature that touches the API, database and front end.
- Working out how an unfamiliar codebase is organized before you change it.
- Fixing a failing test or build, because it can run the command, read the error and try again.
- Chores: dependency upgrades, lint fixes, migrations across many files, writing missing tests, release notes.
- Git work: writing commit messages, resolving merge conflicts, opening pull requests.
Limits and risks
It acts on your machine. Claude Code runs real commands with your user's permissions. Keep approval prompts on for anything destructive, work on a branch, and run unattended sessions in a container or a cloud session. In July 2025, separate incidents with Google's Gemini CLI and Replit's agent showed how coding agents can delete files or data when they misread the state of a system. See the safety section of our terminal guide.
Usage limits. On Pro, long sessions can hit the limit partway through a task. Heavy users tend to move to Max or API billing.
Only Claude models. Claude Code does not run GPT, Gemini or local models. If you want one tool across providers, look at Aider or OpenCode.
Closed source. The client is proprietary. The GitHub repository holds documentation, the changelog and issue tracking, but not the full source. OpenAI's Codex CLI and Google's Gemini CLI are Apache 2.0 licensed.
Review still matters. Like every coding agent, it can produce code that passes tests and still misses intent, or make broader changes than you asked for. Read the diff before you merge.
Claude Code compared with other terminal agents
| Tool | Models | License | Cost to start |
|---|---|---|---|
| Claude Code | Claude only | Proprietary | Claude Pro, $20/month |
| Codex CLI | OpenAI models | Apache 2.0 | Included with ChatGPT plans, or API |
| Gemini CLI | Gemini | Apache 2.0 | Paid Gemini API key or Code Assist license |
| Aider | Any major provider or local | Apache 2.0 | Free tool, pay for model API |
| OpenCode | Many providers | MIT | Free tool, pay for model API |
Choose Claude Code if you already pay for Claude, want the most developed set of hooks, skills, permissions and integrations, and are happy with Claude models. Choose an open-source agent if you need to switch providers, run local models or read the client's code. For editor-based tools, see our coding category and the Claude profile.
Frequently asked questions
Is Claude Code free?
No. The free Claude plan does not include Claude Code. The cheapest option is Claude Pro at $20 a month, or $17 a month billed annually. Max costs $100 or $200 a month for five or twenty times Pro's usage. You can also sign in with an Anthropic Console account and pay per token at API rates, which suits occasional use or automation but can cost more than a subscription for daily work.
How do I install Claude Code?
On macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) also work, along with apt, dnf and apk packages. The native installer updates itself in the background. Homebrew and WinGet installs need manual upgrades. Then open a project folder and run claude to sign in.
Can Claude Code run commands without asking me?
Only if you allow it. By default it asks before editing files or running shell commands. You can approve actions one at a time, allow specific commands permanently in settings, switch to a mode that accepts file edits automatically, or use plan mode, where it researches and proposes a plan without changing anything. A mode that skips all prompts exists for isolated environments such as containers. Avoid it on a machine with credentials or data you care about.
Which models does Claude Code use?
It uses Anthropic's Claude models, and you can switch between them with the /model command. Which models you can pick depends on your plan. Through Bedrock, Google Cloud or Foundry, you use the Claude models your cloud account has enabled. Claude Code does not run OpenAI, Google or local models directly. For a terminal agent that works with any provider, look at Aider or OpenCode.
Does Anthropic train on my code when I use Claude Code?
It depends on the account type. On Free, Pro and Max consumer plans, Anthropic asks whether your chats and coding sessions can be used for training, and the setting covers Claude Code. Team, Enterprise, API and cloud provider usage fall under Anthropic's commercial terms, which exclude customer content from training by default. Check the privacy settings on your account before working in a private repository.
How is Claude Code different from GitHub Copilot or Cursor?
Copilot and Cursor started as editor tools built around autocomplete and inline chat, and both have added agent modes since. Claude Code started in the terminal as an agent. It works through tasks step by step, runs your tests and tools, and shows each action for approval. It has no tab autocomplete. Many developers use it alongside an editor assistant: the editor for small changes, Claude Code for multi-file tasks, refactors and work driven from scripts or CI.
Sources
- Claude Code docs, Overview
- Claude Code docs, Advanced setup
- Claude Code docs, Platforms and integrations
- Claude pricing
- Claude Help Center, What is the Max plan
- Anthropic, Updates to Consumer Terms and Privacy Policy
- Simon Willison, quoting Anthropic's Series G announcement (Feb 2026)
- Claude Code repository and changelog