Introduction
Claude Code is an AI coding agent that runs in your terminal — reading, editing, and executing code across your entire codebase.
Claude Code is a terminal-based AI agent built on Claude. It has direct access to your filesystem, shell, and tools, so you can describe a task in plain language and Claude handles the implementation end-to-end — no copy-pasting, no context switching.
What Claude Code can do
-
Read and edit files — Claude reads source files, writes new content, and makes targeted edits. It shows diffs before applying changes so you stay in control.
-
Run shell commands — Execute tests, build scripts, git operations, and any shell command — with configurable permission controls to keep you safe.
-
Search your codebase — Find files by glob pattern, search content with regular expressions, and navigate large codebases without reading every file manually.
-
Fetch from the web — Pull documentation, read API specs, or search the web — all without leaving your terminal session.
-
Spawn sub-agents — Break complex tasks into parallel workstreams. Claude can spin up and coordinate multiple agents to work on different parts of a problem simultaneously.
-
Connect MCP servers — Extend Claude's capabilities with Model Context Protocol servers for databases, APIs, internal tools, and more.
-
Permission system
Every tool use in Claude Code goes through a permission check. You control how much autonomy Claude has.
| Mode | Behavior |
|---|---|
default | Claude asks before running shell commands and making edits. You approve or deny each action. |
acceptEdits | File edits are applied automatically. Shell commands still require approval. |
plan | Claude produces a plan and asks for your sign-off before taking any action. Good for reviewing large changes before they happen. |
bypassPermissions | All actions run without prompts. Intended for automated pipelines in sandboxed environments — not for interactive use. |
Warning:
bypassPermissionsmode disables all confirmation prompts. Only use it in isolated environments (Docker containers, CI sandboxes) where Claude cannot affect systems outside the task.
Set your permission mode with the --permission-mode flag when starting Claude, or change it with /permissions which also lets you manage allow/deny rules for specific tools:
claude --permission-mode acceptEdits
CLAUDE.md memory system
Claude Code reads CLAUDE.md files from your repository at the start of every session. These files let you encode project-specific knowledge — build commands, coding conventions, architecture notes, required environment variables — so Claude doesn't need to re-discover them from scratch every time.
There are three scopes:
- Project (
CLAUDE.mdat the repo root) — shared by everyone on the team, checked into source control. - Personal (
CLAUDE.local.mdat the repo root) — your private preferences for this project, gitignored. - Subdirectory (
CLAUDE.mdinside a subdirectory) — loaded automatically when Claude works in that directory. Useful for monorepos with distinct modules.
Run /init inside any Claude Code session to generate a CLAUDE.md for your project automatically. Claude analyzes your codebase and produces a file with the commands and context that matter most.
# Inside a Claude Code session
/init
Tip: Keep
CLAUDE.mdconcise. Every line should pass this test: "Would removing this cause Claude to make mistakes?" If not, cut it.
Authentication
Claude Code authenticates in two ways:
- OAuth (recommended) — Sign in with your Anthropic account at
claude.ai. Runclaudefor the first time and follow the browser prompt. - API key — Set the
ANTHROPIC_API_KEYenvironment variable. Useful for CI pipelines and non-interactive sessions.
See Authentication for the full priority order and cloud provider options (AWS Bedrock, GCP Vertex AI).
Ready to get started?
-
Quickstart — Get Claude Code running in under 5 minutes
- Installation — Detailed installation instructions for all platforms