Published September 5, 2026 · 15 min read · Sourced from Anthropic’s official docs
Claude Code CLI Complete Master Guide: Features, Terminal Integration & Workflows
Claude Code is Anthropic’s agentic command-line tool for software development: it lives in your terminal, reads your project the way a new engineer would, and takes real actions \u2014 editing files, running tests, and managing git \u2014 instead of only returning suggested code in a chat window. This guide covers what it actually is, how to install it on Windows, macOS, and Linux, its full feature set from subagents to MCP, its permission and safety model, current pricing structure, and how it compares to inline autocomplete-style coding assistants.
What Is Claude Code?
Claude Code is an agentic coding tool that operates directly inside a terminal session rather than as a chat sidebar or an inline autocomplete popup. It understands a project’s structure without every file needing to be manually attached, and it can take real, direct actions on that project: editing files, executing shell commands, running a test suite, and creating git commits or pull requests. The distinction Anthropic itself draws is architectural \u2014 Claude Code is not a chatbot that happens to know about programming; it is an agent loop that reads, plans, acts, and checks its own work inside your actual development environment.
It is built and maintained by Anthropic, the company behind the Claude model family, and is distributed as an installable command-line application (package name @anthropic-ai/claude-code) rather than a hosted web product.
Architecture & Anthropic Model Integration
Claude Code connects straight to Anthropic’s API \u2014 there is no intermediary server sitting between the CLI and the model \u2014 which keeps the request path short and keeps a project’s source code from being routed through additional third-party infrastructure. Under the hood it runs on Anthropic’s current Claude models, and lets a session switch between a faster, lower-cost model for routine edits and a more capable model for harder reasoning tasks, so cost and capability can be tuned per task rather than fixed for the whole session.
For organizations that need to keep model traffic inside an existing cloud compliance boundary, Claude Code also connects to Amazon Bedrock and Google Vertex AI as alternative model-serving backends, without changing how the CLI itself is used day to day.
Installation, Terminal Setup & Prerequisites
Claude Code requires an active Claude account \u2014 either a Claude.ai plan (Pro or Max) or Claude Console/API access \u2014 and installs through one of three paths: an npm global install (needs Node.js 18 or newer), a native installer that is currently in beta, or a Homebrew cask on macOS and Linux. All three land on the same claude command once finished.
System requirements & install method by OS
Basic setup flow
After installing, open a terminal in any project directory and run claude. On first run, the session prompts a login via /login, supporting either a Claude.ai account or a Claude Console (API) account under the same email address. Credentials are then stored locally, so login is a one-time step unless a session is explicitly logged out or a different account is switched in later. A project-level CLAUDE.md file can also be added to describe a codebase’s conventions, so every new session starts with that context already loaded.
Core Capabilities & Terminal Integration
Every capability below runs from the same terminal session \u2014 there is no separate mode to switch into for editing versus testing versus git work.
Multi-file refactoring & bug fixing
Reads across an entire project — not just the open file — to trace a bug or apply a change consistently across every file it touches, then edits the files directly on disk.
Autonomous codebase exploration
Explores unfamiliar repositories on its own, following imports and call sites to build context, so files don’t need to be manually added before asking a question.
Git workflow integration
Searches git history, helps resolve merge conflicts, and can stage, commit, and open pull requests as part of a normal terminal session.
Test & lint execution
Runs a project’s existing test suite, linter, or build commands, reads the failure output, and iterates on a fix instead of only suggesting one.
Web-aware research
Can browse documentation and other resources on the web mid-task, so it can check an API’s current signature instead of relying only on training data.
Enterprise deployment paths
Connects to Amazon Bedrock or Google Vertex AI as an alternative to the direct Anthropic API, for teams that need those platforms’ compliance and procurement controls.
CLI Command & Parameter Reference
A working subset of commands used inside an interactive session \u2014 not exhaustive, but enough to cover day-to-day use, cost tracking, and MCP/IDE connections.
Common Claude Code commands
Advanced Agentic Behaviors: Subagents, Hooks, MCP & Plugins
Subagents & autonomous task delegation
A Claude Code session can delegate a specific piece of work \u2014 a security review, a database migration, triaging a log file \u2014 to a named subagent with its own system prompt, its own restricted set of allowed tools, and its own model choice. Subagents are typically defined as markdown files under a project’s .claude/agents/ directory and are invoked either explicitly by name or automatically once Claude recognizes a task matches one.
Hooks for deterministic automation
Hooks are shell commands that fire on specific lifecycle events \u2014 such as immediately after a file edit or before a tool call \u2014 so automation that must always run (formatting, a policy check, a CI trigger) doesn’t depend on the model remembering to run it every time.
Model Context Protocol (MCP) integration
MCP is the open protocol Claude Code uses to connect to external tools and data sources \u2014 issue trackers, databases, internal APIs, design tools \u2014 as first-class capabilities inside a session, added with claude mcp add and inspected with /mcp. Server configuration can be scoped to a single user or shared with a team via a project’s .mcp.json file.
Plugins & Agent Skills
Plugins bundle a set of MCP servers, hooks, and custom commands into one installable package, so a team can standardize a workflow instead of every developer configuring it individually. Agent Skills are reusable, packaged instructions for a specific kind of work \u2014 producing a particular document format, following a house coding style \u2014 that Claude Code loads only when a task actually needs them.
Headless mode & automation pipelines
Beyond the interactive terminal session, Claude Code supports a headless mode for non-interactive use \u2014 running from a CI/CD pipeline, a script, or a GitHub Actions workflow \u2014 so the same agentic behaviors can be triggered on a schedule or a repository event rather than only manually.
IDE Integration & Enterprise Deployment
A Claude Code session can connect to a running, supported IDE (via /ide) through official extensions for editors like VS Code and JetBrains IDEs, so file diffs and selections stay visible in the editor while the agent works from the terminal alongside it.
For organizations already standardized on a specific cloud, Claude Code deploys through Amazon Bedrock or Google Vertex AI instead of the direct Anthropic API, and Claude Console accounts get centralized cost tracking across every developer’s Claude Code usage under one workspace.
Safety, Prompt Controls & Permissions
Claude Code does not silently run arbitrary commands. A permission system gates file edits and shell command execution behind confirmation prompts by default, with fine-grained allow/deny rules that can be configured per project so routine, trusted actions (like running an existing test command) can be pre-approved while riskier operations still require a manual confirmation. This is the same permission layer that hooks and hooks-based CI automation build on top of, rather than a separate system.
Pricing Structure
Claude Code has no separate license fee of its own \u2014 it draws on whichever Claude access already exists. In practice that means one of two billing paths: a Claude subscription (Pro, Max, Team, or Enterprise) that includes Claude Code usage within that plan’s limits, or direct Anthropic API access billed per token, tracked in-session with the /cost command and, for teams, through the Anthropic Console’s usage and spend-limit tools.
Subscription tiers scale from an individual Pro plan up through Max (higher usage limits, priced higher per month), a Team plan with per-seat pricing and shared/parallel session support, and a custom Enterprise tier for larger organizations. Token rates for API billing vary by model \u2014 a faster, cheaper model for routine edits and a more capable, pricier model for harder reasoning \u2014 and both subscription prices and API token rates change periodically, so this guide intentionally doesn’t hard-code numbers that would go stale; current figures are always published at claude.com/pricing.
Performance Considerations
Real-world Claude Code performance depends heavily on which model is selected for a given task, how large and well-structured the codebase is, and how much of the work is run in automation (multiple parallel sessions or CI-triggered runs) versus a single interactive session. Rather than quoting a specific benchmark percentage here \u2014 published coding-benchmark numbers vary by test harness and shift with every model release \u2014 the practical takeaway is to match the model tier to the task: a faster, lower-cost model for routine, well-scoped edits, and a more capable model reserved for multi-step reasoning or unfamiliar parts of a codebase. Anthropic’s own model documentation is the right place to check current benchmark figures for whichever model a session is running.
Claude Code vs. Inline Autocomplete-Style Assistants
Not every AI coding tool solves the same problem. Inline, editor-native autocomplete assistants are optimized for fast, low-friction suggestions as a developer types; Claude Code is built for a different shape of task \u2014 a whole piece of work described up front, executed and checked across a whole project.
Claude Code vs. inline autocomplete-style tools
The two categories are complementary more often than competing \u2014 many developers keep an inline completion tool running for moment-to-moment typing while reaching for Claude Code when a task spans multiple files, needs a command actually run, or requires exploring unfamiliar code first.
Frequently Asked Questions
What is Claude Code used for?
Claude Code is Anthropic’s agentic command-line tool for software development — it edits files and fixes bugs across a codebase, answers questions about architecture, runs and fixes tests or linters, manages git history and pull requests, and can browse documentation on the web, all from a terminal session.
Is Claude Code free to use?
Claude Code itself has no separate license fee. It runs on top of a Claude subscription (Pro, Max, Team, or Enterprise) or on pay-per-token Anthropic API access, so cost depends on which plan or API usage you already have rather than a standalone Claude Code price tag. Current plan and token rates are published at claude.com/pricing.
Do I need to know how to code to use Claude Code?
Basic terminal comfort helps — installing it, running `claude`, and reading its output — but the tool is designed to be directed in plain natural language rather than requiring the user to already know the exact fix. That said, reviewing what it changes is still the user’s responsibility, especially before merging to a shared branch.
Does Claude Code work on Windows?
Yes. Windows is supported through a native PowerShell/CMD installer (currently in beta) or by installing via npm inside WSL, the same install path used on macOS and Linux.
What are subagents and hooks in Claude Code?
Subagents are named, independently configured sub-sessions (their own system prompt, tool access, and model choice) that the main Claude Code session can delegate a specific task to, such as a security review or a database migration. Hooks are deterministic shell commands that fire on specific lifecycle events — like after a file edit — for automation that shouldn’t depend on the model deciding to run it.
Can Claude Code connect to my own tools and data?
Yes, through the Model Context Protocol (MCP). Claude Code can connect to MCP servers for services like issue trackers, databases, or internal APIs, and plugins can bundle a set of MCP servers, hooks, and custom commands together for a team to install at once.