beginner·
10 min

Claude Code CLI: the power from your terminal

Integrate Claude directly into your development workflow

What is Claude Code?

Claude Code is Anthropic's official CLI. It's not just "Claude in the terminal" — it's an agent that can read your codebase, execute commands, create files, and work with you in real time inside your development environment.

Installationbash
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version

Usage modes

  • Interactive: claude → opens persistent chat in your current directory
  • One-shot: claude "do X" → executes and exits, ideal for scripts
  • Pipe: cat file.ts | claude "explain this" → processes stdin
  • With context: claude --context ./src "review the architecture"
Most useful flagsbash
# Non-interactive mode (for CI/scripts)
claude --no-interactive "generate tests for auth.ts"

# Specify model
claude --model claude-sonnet-4-6 "..."

# Limit output tokens
claude --max-tokens 2000 "summarize this file"

# Continue previous conversation
claude --continue

# See available tools
claude --help tools

Permissions and security modes

Claude Code has 4 permission modes that control what it can do automatically:

  • default: asks for confirmation on risky actions (edit, execute)
  • auto-approve: automatically approves low-risk actions
  • full-auto: executes everything without confirmation (careful in production)
  • read-only: can only read, never modify
WARNING

Use full-auto only in controlled environments. In production projects, default or auto-approve are safer.

Editor integration

Claude Code has extensions for VS Code and JetBrains. It also works natively in Cursor. The integrated terminal in your editor is the most productive setup.

Typical workflowbash
# 1. Open Claude Code in your project
cd my-project && claude

# 2. Give initial context
> Read the CLAUDE.md and project structure

# 3. Start working
> Add email validation to the registration form in src/components/auth/RegisterForm.tsx

# 4. Review and approve changes
# Claude shows diffs and asks for confirmation