Claude Code is Anthropic's official command-line interface for Claude. It brings AI-assisted coding directly into your terminal — letting you write, edit, debug, and refactor code through natural language while Claude reads your actual project files and runs commands.

What is Claude Code?

Unlike a chat interface where you paste code snippets back and forth, Claude Code is an agentic coding tool. It can:

  • Read and edit files directly in your project
  • Run shell commands and see their output
  • Search your codebase with grep and glob
  • Create and manage files across your repository
  • Connect to external tools via MCP (Model Context Protocol)

Installation

Claude Code requires Node.js 18+ and an Anthropic API key.

# Install globally via npm
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version

# Start a session in your project directory
cd your-project
claude

Essential Commands

CommandWhat it does
claudeStart an interactive session in current directory
claude "task description"Run a one-shot task and exit
claude --continueResume the most recent session
claude --model claude-opus-4-8Use a specific model
/helpShow available slash commands inside a session
/compactSummarise context to save tokens
/costShow token usage and cost for the session

Key Features

  • File-aware context — Claude reads your actual source code, not just what you paste
  • Tool use — Read, Edit, Write, Bash, Grep, Glob built in
  • MCP support — Connect Claude to databases, APIs, and external services
  • CLAUDE.md — Project-specific instructions Claude reads on every session
  • Hooks — Run shell scripts automatically before/after tool use
  • Permission modes — Control which actions Claude can take autonomously

Use Cases

  • Refactor a legacy codebase with AI guidance
  • Write tests for untested functions
  • Debug complex errors by letting Claude trace through files
  • Build new features from a natural-language spec
  • Automate repetitive code tasks (rename, migrate, format)