Claude Code
Claude Code is Anthropic's official command-line agent that plans, edits, runs, and verifies code across your repo using Claude models and tool use.
Claude Code is Anthropic's official CLI agent for software development. It runs in your terminal, reads and edits files in your working directory, executes shell commands, and iterates toward a goal using Claude models (Sonnet, Opus, Haiku). Unlike editor-embedded assistants, it's terminal-first and treats your repo as its workspace.
Why it matters
Claude Code is one of the canonical examples of agentic coding. You describe a task and it plans, modifies code, runs tests, reads output, and corrects itself — all without leaving the terminal. Because it's a CLI, you can run several instances in parallel on different tasks, pipe it through scripts, or embed it in CI.
SpaceSpider was built largely around this workflow: run several Claude Code sessions side-by-side in a grid layout, each scoped to a different space or git worktree. See cli-claude for our setup guide.
How it works
Claude Code maintains a context window seeded with your project files and a system prompt describing its tools. Each turn it may call tools: file read/write, bash execution, glob/grep search, web fetch, and MCP servers you've configured. Edits are applied as diffs; shell commands stream output back into context.
Notable features:
- Plan mode — read-only investigation before making changes
- Checkpoints — roll back file edits to a prior state
- Slash commands — reusable prompt macros invoked with
/ - Hooks — run scripts on events like
PreToolUseorStop - Subagents — delegate focused subtasks to isolated agent instances
It authenticates via an Anthropic API key or your Claude.ai subscription, and configuration lives in ~/.claude/.
How it's used
Common patterns:
claude— start an interactive session in the current directory- Non-interactive one-shots via
claude -p "your prompt"for scripting - Long-running tasks with hooks triggering tests after each edit
- Parallel panes in SpaceSpider, each tackling a separate ticket
See /compare/claude-code-vs-cursor, /compare/claude-code-vs-codex, and /alternatives/claude-code for comparisons.
Related terms
- Codex CLI — OpenAI's agentic CLI competitor
- Qwen Code — Alibaba's open agentic CLI
- Kimi CLI — Moonshot's agentic CLI
- MCP — the tool protocol Claude Code speaks
- Agentic coding — the category Claude Code defines
FAQ
Is Claude Code open source?
The CLI is distributed as a binary/npm package; its prompts and orchestration are proprietary. Anthropic does publish docs for hooks, slash commands, and MCP integration.
Does Claude Code work offline?
No. It calls the Anthropic API on every turn. You need an API key or Claude.ai subscription and internet access.
Related terms
- Agentic codingAgentic coding is software development where an LLM-powered agent plans, edits, runs, and verifies code on its own using tools, not just autocomplete.
- AI pair programmingAI pair programming is a collaboration style where an LLM assistant sits alongside you, suggesting code and reviewing changes in real time as you work.
- ANSI escape codesANSI escape codes are control sequences that terminals interpret for colors, cursor movement, and screen clearing — the language of every modern CLI UI.
- Autonomous agentAn autonomous agent is an AI program that perceives, decides, and acts on its own toward a goal — the architecture behind modern coding CLIs.
- CheckpointA checkpoint is a saved snapshot of file state that lets you roll back an AI coding agent's changes to a known-good point.
- CLI wrapperA CLI wrapper is a program that launches, manages, and UI-wraps other command-line tools — how apps like SpaceSpider host Claude Code and Codex CLI.