Claude Code is Anthropic’s CLI tool, launched in 2025 and already a daily driver for many heavy Terminal users by 2026. It can read and write files directly, run commands, operate git, connect to external tools through MCP, and works nothing like the old Claude/ChatGPT web workflow of “paste code, get advice, edit by hand.” This guide covers installation, hooks, MCP, and scheduling in one place.
TL;DR: Claude Code is Anthropic’s CLI tool for talking to Claude directly in Terminal. It is built for developers, can read and write files, run commands, connect to external tools through MCP, and with CLAUDE.md it can become a personalized AI development environment.
Do not let Terminal scare you off at the beginning. The real beginner path is short: install Claude Code, sign in, run the first conversation in a safe folder, and create CLAUDE.md. Once it can reliably read files, edit small text, and show you diffs you understand, then move toward hooks, MCP, and scheduled tasks. The full walkthrough is in Claude Code Beginner Guide.
What Claude Code Is
Claude Code is Anthropic’s official agentic development tool, available in four forms: Terminal CLI, IDE extensions, a desktop app, and a web version. Type claude in Terminal and you can talk to Claude while it directly operates on the file system.
The difference from the Claude/ChatGPT web app is here: Claude/ChatGPT lives in the browser. You paste code, it returns suggested changes, and you copy them back manually. Claude Code reads the project folder directly and saves its own edits.
In practice: when you type “add error handling to this function,” it actually opens the file, finds the function, adds try-catch, and saves the file. You only need to review the diff.

The biggest difference from other AI coding tools is that Claude Code’s main interface is Terminal. No sidebar, no polished buttons (for a graphical interface, use the VS Code or JetBrains extensions or the desktop app). For people used to CLI, that is an advantage. For people who are not, it is a threshold. For the full comparison, see Claude Code vs Cursor.
Installation Steps
Requirements
- macOS 13 or later, Windows 10 1809 or later, or Ubuntu 20.04 / Debian 10 / Alpine 3.19 or later (4 GB of RAM or more)
- A Claude Pro, Max, or Ultra subscription, or an Anthropic Console account
Installation
curl -fsSL https://claude.ai/install.sh | bash
This is the official native install command for macOS, Linux, and WSL. On Windows PowerShell, use irm https://claude.ai/install.ps1 | iex. You can also use Homebrew (brew install --cask claude-code) or npm (npm install -g @anthropic-ai/claude-code@latest, which needs Node.js 22 or later).
After installation, type this in Terminal:
claude
On first launch it asks you to sign in, with either a Claude subscription account or a Console account. Follow the instructions, then you can start chatting.
Run a simple test after installation to confirm the environment works:
claude "列出目前資料夾裡的所有 .md 檔案"
It should use ls or glob to find the files for you. If it responds correctly, installation succeeded.
Common Installation Issues
claude command not found: open a new Terminal window and run claude --version. If it is still not found, the install directory is not in your PATH yet.
Problems that only come with npm installs: an npm install needs Node.js 22 or later. Check with node -v. With nvm: nvm install 22 && nvm use 22. If you hit permission errors, do not use sudo npm install -g. Use nvm to manage Node.js, or switch to the native install.
The full beginner walkthrough is in Claude Code Beginner Guide.
Core Features
Terminal AI: Working Inside Your Environment
Claude Code’s most basic ability is being an AI assistant inside Terminal. It can:
- Read and write files: inspect code, edit it, and create new files
- Run commands: run git, npm, or any CLI tool
- Search code: use grep/glob across the whole project
- Understand context: read CLAUDE.md and related files to know what the project is doing
A practical use case: code audit. Ask it “check whether the latest commit has security issues,” and it will run git diff, inspect files one by one, and report potential risks. Something that used to take 30 minutes to review can become 3 minutes of reading its report.
Hooks: Automated Triggers
Hooks let you run actions automatically when specific events happen. For example:
- Before Claude Code runs a bash command, check whether it is dangerous
- At the end of a conversation, update working memory automatically
- After files are modified, run a linter automatically
Hooks are configured in settings.json. A common hook setup is blocking any git push --force before Claude Code runs it, so a careless command does not damage production.
Hooks are one of the biggest differences between Claude Code and pure chat tools. They make AI behavior constrainable and automatable.
MCP: Extending Capabilities Without a Ceiling
MCP (Model Context Protocol) is an open standard for connecting external tools. Through MCP, Claude Code can connect to external tools.
Common MCP servers include browser automation, database queries, and external APIs. Once configured, you can tell Claude in Terminal, “check the response format for this API,” and it can call through MCP.
Project-shared MCP configuration lives in .mcp.json at the project root, and personal configuration lives in ~/.claude.json. Both use JSON format, defining how each server connects and which tools are available. You can also add servers with the claude mcp add command.
Scheduled Tasks: Scheduled Work
Claude Code supports the /loop command for recurring tasks, which can run daily or weekly. /loop only works inside the current session, and a recurring task expires 30 days after it is created (older versions used 7 days). For schedules that keep running after you close the session, use cloud scheduled tasks (formerly Routines), scheduled tasks in the desktop app, or GitHub Actions.
Common scheduled tasks:
- Run a content schedule every morning and publish finished drafts to Buffer
- Run regular code health checks
- Clean up outdated working memory every week
Scheduled tasks become especially powerful with hooks. When a task finishes, it can trigger notifications and update status files automatically, with no human intervention.

CLAUDE.md: Let AI Remember Your Rules
The smartest part of Claude Code’s design is CLAUDE.md: it can remember everything you need it to remember, assuming the rules are designed well.
Place a CLAUDE.md file at the project root, and Claude Code reads it automatically every time it starts. You can write:
- Project code standards
- Forbidden actions, such as no
git push --force - Preferred tools and workflows
- File structure notes
A reasonable evolution path: start with 10 lines, then add one rule whenever you hit a pitfall. After three months, you have a deeply personalized AI operating manual.
This is similar to Cursor’s .cursor/rules, but Claude Code’s ecosystem lets CLAUDE.md do more, such as cross-file rule references and layered loading.
Differences from Cursor
After using both, the conclusion is simple: they are positioned completely differently.
| Comparison | Claude Code | Cursor |
|---|---|---|
| Interface | Terminal-first (also IDE extensions, desktop app, web) | IDE (graphical interface), plus CLI and cloud agents |
| Learning curve | Medium-high; you need Terminal familiarity | Low; install and use |
| Flexibility | Extremely high; can run any command | Medium; constrained by the IDE frame |
| Automation | hooks + scheduling + MCP | MCP, hooks, Automations (depends on plan) |
| Best for | CLI lovers, DevOps, heavy automation | Frontend, general developers, people who want quick onboarding |
The usual reason to choose Claude Code is that the workflow already lives in Terminal. git, npm, docker: everything happens there. Adding an AI assistant into the same environment feels much more natural than switching to another IDE.
For the full Cursor comparison, see Claude Code vs Cursor.
Claude Code / Cursor / Copilot Decision Table
| Use case | Recommended tool | Why |
|---|---|---|
| Terminal-first, repo-wide tasks, scheduling, automation | Claude Code | Native CLI flow with file edits, command execution, hooks, and MCP |
| Frontend work, live preview, IDE diff review | Cursor | Graphical interface, inline diffs, and multi-file Agent are smoother |
| Team already lives in GitHub PR / issue workflow | GitHub Copilot | Deepest integration with PR review, issue to PR, and organization policy |
| Custom OpenAI-family coding pipeline | Codex | Included in ChatGPT plans, and an API key works too at API usage rates, good for custom integrations |
This table follows the core judgment in Claude Code vs Cursor: Claude Code and Cursor are not simple replacements for each other. Claude Code is a Terminal agent, Cursor is an AI IDE, and Copilot is a GitHub workflow assistant.
Advanced Use Cases
Multi-Agent Management
OpenClaw is a multi-agent system built with Claude Code. Four agents each handle different work: Opus for strategy, Sonnet for mechanical tasks, Codex for code, and Gemini for third-party perspective.
Claude Code is the operating interface for the whole system. In Terminal, you can switch agents, dispatch work, and inspect each agent’s output.
Content Production
Long-form drafts can be produced inside Claude Code. Give it an outline and a style guide, let it generate a draft, then revise and polish. The whole process stays inside Terminal.
Code Audit
Whenever there is a new commit, Claude Code can run a security check. It reads the diff, looks for injection risk, and checks whether secrets were accidentally committed.
Pitfall Notes
Context window overflow: Claude Code conversations have a token limit. At first, everything was stuffed into CLAUDE.md: more than 800 lines of memory files, eating a large amount of context before the conversation even started. Later it was split into a layered architecture, where specific files are read only when needed, cutting context usage roughly in half.
A bad hook caused an infinite loop: a hook was set to run lint after every file change, but lint auto-fixed files, triggering the hook again. The chain ran dozens of times before Ctrl+C stopped it. Lesson: hook triggers need guardrails so they do not trigger themselves.
Scheduled task timezone issue: a schedule was set in UTC while the server was expected to behave like Taiwan time. A task meant for 8 a.m. ran at midnight. Always check the wall clock and timezone settings when reviewing schedules.
Where Beginners Should Start
Suggested path for first-time Claude Code users:
- Install the environment and run a few simple conversations to feel it out
- Create a
CLAUDE.mdin the project with three rules you care about most (or ask Claude to help write it) - Try asking it to handle one thing you do every day
- When you hit pitfalls, update CLAUDE.md and accumulate rules slowly
For a more detailed beginner guide, read Claude Code Beginner Guide.
Penchan’s Take
Penchan’s main tool is Claude Code. The first thing in Terminal every day is launching it. Writing articles, writing code, managing schedules, and managing a multi-agent system all happen there. CLAUDE.md has evolved into a whole rule system, from the original 10 lines to today’s layered multi-file architecture. This rule design is the biggest difference between Claude Code and other AI coding tools.
The OpenClaw multi-agent system is built on Claude Code: Opus for strategy / Sonnet for mechanical tasks / Codex for code / Gemini for third-party opinion. Normal users do not need that level of complexity, but if you want to try a multi-agent workflow, Claude Code is currently the only tool that can really carry it.
Cursor never entered the daily workflow because the workflow was already in Terminal. The IDE route was tried through Antigravity; having AI watch the project and pop up suggestions while coding is smooth for people used to IDEs. But Penchan’s work leans toward the automation path of “configure it and let it run.” Hooks + scheduling + MCP are still hard for other tools to match.