# Claude Code: Anthropic's Terminal Coding Agent

Claude Code is a terminal-based AI coding agent from [Anthropic](https://www.anthropic.com/) that reads a project's files, edits them, runs shell commands, and iterates on the results. A request is described in plain language, and Claude Code decides which files to read, which commands to run, and what code to write; when a command fails, it reads the error and adjusts. It also runs as a VS Code and JetBrains extension, a desktop app, and in the browser at [claude.ai/code](https://claude.ai/code), all backed by the same engine.

{{< callout type="info" >}}
Claude Code is powered by Anthropic's Claude models (the Opus, Sonnet, and Haiku families) and requires a Claude paid subscription or an Anthropic Console API account.
{{< /callout >}}

Claude Code has no language of its own. It operates whatever tooling a project already uses, which makes its Python behavior a product of configuration rather than built-in support. Pointed at a Python repository, it can install and run [uv](https://pydevtools.com/handbook/reference/uv.md), create virtual environments, run and repair [pytest](https://pydevtools.com/handbook/reference/pytest.md) suites, apply [Ruff](https://pydevtools.com/handbook/reference/ruff.md) lint and format fixes, run [mypy](https://pydevtools.com/handbook/reference/mypy.md) or [ty](https://pydevtools.com/handbook/reference/ty.md), and read a traceback to locate the failing line.

## When to use Claude Code

Claude Code suits tasks that span multiple files and require running commands to verify the result: writing and fixing a test suite, migrating a project from `requirements.txt` to a [pyproject.toml](https://pydevtools.com/handbook/reference/pyproject.toml.md)-based uv workflow, resolving lint and type errors across a package, or tracing a bug from a stack trace to its cause. Its standing-instructions file and hooks make it a fit for teams that want an agent to follow the same tooling conventions on every run. For editor-native inline completion, an autocomplete tool such as [GitHub Copilot](https://github.com/features/copilot) fits closer to the keystroke; Claude Code operates at the level of a whole task.

## Key Features

* Project-level file editing: reads and edits files across a repository, not one buffer at a time
* Shell execution: runs build, test, and lint commands and reacts to their output
* `CLAUDE.md` standing instructions: project-root Markdown that configures behavior for every session
* Hooks: shell commands that fire before or after agent actions, such as formatting after every edit
* Skills and plugins: packaged, shareable workflows and tool bundles invoked by name
* Model Context Protocol (MCP) support: connects external data sources and tools through an open standard
* Git integration: stages changes, writes commit messages, creates branches, and opens pull requests
* Scriptable CLI: the `claude -p` flag runs a prompt headlessly for pipelines and CI

## Configuration and Instructions

`CLAUDE.md` is a Markdown file placed in the project root that Claude Code reads at the start of every session. It records standing instructions: which package manager to use (for example, "use uv, never pip"), how to run the test suite, which type checker the project runs, and code conventions to follow. Because it is committed to version control, every collaborator and every session inherits the same behavior. Claude Code also maintains auto memory, saving learnings such as build commands across sessions without manual editing.

Settings files control permissions, model selection, and environment for a project or user. Hooks extend this configuration with shell commands bound to lifecycle events: a `PostToolUse` hook can run `ruff format` after each edit, and a hook before a commit can block it if `pytest` fails.

## Extending Claude Code

Skills package a repeatable workflow (a prompt, its instructions, and any scripts) so it can be invoked by name or matched from a natural-language request. Plugins bundle skills, slash commands, hooks, and MCP servers for distribution through a marketplace; [Astral](https://astral.sh/) publishes a plugin that wires uv, Ruff, and ty defaults into a project.

Model Context Protocol (MCP) servers connect Claude Code to external systems such as issue trackers and databases through a single open protocol, so the agent can read and write data beyond the local filesystem.

## Installation

```bash
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Homebrew (macOS/Linux)
brew install --cask claude-code
```

After installation, run `claude` inside a project directory to start a session; the first run prompts for login.

## Pros

* Whole-project action: edits files and runs commands rather than suggesting single lines
* Tool-agnostic operation: drives uv, Ruff, pytest, and type checkers through the project's existing configuration
* Reproducible behavior: `CLAUDE.md` and hooks version-control agent conventions across a team
* Headless automation: `claude -p` runs prompts in CI, pipelines, and scripts
* Extensibility through skills, plugins, and MCP servers

## Cons

* Requires a paid Claude subscription or metered Anthropic API access; usage on large codebases consumes tokens
* Effective results depend on a well-written `CLAUDE.md`; without one, tooling conventions are not enforced
* Terminal-first workflow is less familiar than inline editor completion for some developers
* Autonomy over shell commands and git requires review discipline (see [enough git to supervise an AI coding agent](https://pydevtools.com/handbook/explanation/enough-git-to-supervise-your-ai-coding-agent.md))

## Learn More

* [Claude Code for Python: A Complete Guide](https://pydevtools.com/handbook/explanation/claude-code-complete-guide.md) (Explanation)
* [Set up a Python project for Claude Code](https://pydevtools.com/handbook/tutorial/set-up-a-python-project-for-claude-code.md) (Tutorial)
* [How to configure Claude Code to use uv](https://pydevtools.com/handbook/how-to/how-to-configure-claude-code-to-use-uv.md)
* [How to configure Ruff with Claude Code](https://pydevtools.com/handbook/how-to/how-to-configure-ruff-with-claude-code.md)
* [How to configure Claude Code for pytest](https://pydevtools.com/handbook/how-to/how-to-configure-claude-code-for-pytest.md)
* [How to configure Claude Code with a Python type checker](https://pydevtools.com/handbook/how-to/how-to-configure-claude-code-with-a-python-type-checker.md)
* [How to write Claude Code hooks for Python projects](https://pydevtools.com/handbook/how-to/how-to-write-claude-code-hooks-for-python-projects.md)
* [How to use Python skills with Claude Code](https://pydevtools.com/handbook/how-to/how-to-use-python-skills-with-claude-code.md)
* [How to install Astral plugins for Claude Code](https://pydevtools.com/handbook/how-to/how-to-install-astral-plugins-for-claude-code.md)
* [Claude Code Documentation](https://code.claude.com/docs/en/overview)
* [CLAUDE.md and memory](https://code.claude.com/docs/en/memory)
* [Model Context Protocol](https://code.claude.com/docs/en/mcp)
