Skip to content

Claude Code: getting started

Beginner 15 min

Claude Code is Anthropic Claude as an agent in your terminal. It can read code, explain architecture, edit files, run commands, and help with longer workflows.

  • macOS, Linux, Windows, or WSL
  • Git
  • A Claude account, Anthropic Console access, or another supported provider
  • A project you can test on

Anthropic currently recommends the native installer.

Terminal window
curl -fsSL https://claude.ai/install.sh | bash
claude --version

Start Claude Code in a project:

Terminal window
cd your-project
claude

Check auth status:

Terminal window
claude auth status
  1. Check Git state:

    Terminal window
    git status
  2. Start Claude Code:

    Terminal window
    claude
  3. Send a planning task without edits:

    Read the project and make a short plan for understanding it.
    Do not change files and do not run commands yet.

Long development flows

Claude Code is strong when the task needs dialogue, planning, follow-up fixes, and several rounds of testing.

Repository memory

CLAUDE.md, imports, local rules, and memory make it easier to reuse project knowledge across sessions.

Team workflows

Claude Code fits teams that also want hooks, skills, custom commands, CI/CD, Slack, or multiple developers.

Good first analysis task:

Read the repository as onboarding.
Find entrypoints, build/test commands, deployment, data stores, and main risks.
Do not make changes until I approve a concrete plan.

Good first write task:

Make only the smallest necessary change.
First explain which files you will edit and why.
Run the relevant test/build afterward.
Stop if you need to install a dependency, change Git state, or use the network.

Claude Code reads CLAUDE.md for project memory and instructions. You can create one with /init.

CLAUDE.md
# CLAUDE.md
## Project rules
- Explain the plan before editing files.
- Use existing scripts in `package.json`.
- Ask before network calls or deploys.
## Verification
- Run `npm run build` after changes.

You can import shared instructions with @AGENTS.md or other markdown files. Use that if the repository already has a shared agent file, so you do not maintain three different sources of truth.

Practical split:

NeedLocation
Shared repository rulesCLAUDE.md in the repository root
Private notesCLAUDE.local.md and .gitignore
Area-specific rules.claude/rules/*.md
Personal defaults~/.claude/CLAUDE.md
CommandUse
claudeStart an interactive session
claude -p "..."Print/script mode
claude -cContinue latest conversation
claude auth statusCheck login
claude updateUpdate the CLI
claude mcpManage MCP servers
/costShow token usage for API-based usage
/statsShow usage patterns for subscription-based usage

Claude Code starts with safer permissions and asks before actions such as file edits, commands, and network access. Say no when you cannot see why an action is necessary.

claude -p is useful for short non-interactive tasks:

Terminal window
claude -p "Explain the biggest risks in this diff. Do not make changes."

Use it for reports, summaries, and CI-style checks. Use interactive Claude Code for larger changes, because you get better control over approvals, the plan, and stopping overly broad changes.

Claude Code can run through a subscription or API usage. Watch especially for:

  • large repositories adding more context
  • long CLAUDE.md files and many rules increasing prompt size
  • hooks and tools triggering extra model and tool calls
  • claude -p becoming expensive in loops if the script sends a lot of input
  • Opus/Sonnet/Haiku needing to match task difficulty

For everyday development, Sonnet is often the practical starting point. Use a stronger model for architecture, hard debugging, or high-risk review, and a cheaper model for repeated summaries.

Last checked: April 11, 2026.


Comments