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 MCP plugins, 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 Node.js, 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 as CLI, Desktop, and Cloud. 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 has no graphical interface. No sidebar, no polished buttons, just Terminal. 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
- Node.js 18 or later (nvm is recommended for version management)
- macOS or Linux (Windows through WSL2)
- Anthropic account
Installation
npm install -g @anthropic-ai/claude-code
After installation, type this in Terminal:
claude
On first launch it asks you to sign in to your Anthropic 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
Node.js is too old: check with node -v. If it is below 18, upgrade. With nvm: nvm install 18 && nvm use 18.
Permission issues: if macOS shows permission errors, do not use sudo npm install -g. Use nvm to manage Node.js instead, and this problem usually disappears.
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 Claude Code’s plugin system. 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.
MCP configuration files live under the .claude/ folder in JSON format, defining how each server connects and which tools are available.
Scheduled Tasks: Scheduled Work
Claude Code supports the /loop command for recurring tasks, which can run daily or weekly. The desktop version can run for up to 3 days, while Anthropic’s Cloud version can run indefinitely.
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 .cursorrules, 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 (CLI) | IDE (graphical interface) |
| 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 | Limited |
| 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 Composer 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 | API / token billing entry point 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.
Further Reading
- Claude Code vs Cursor Comparison
- Claude Code Beginner Guide
- Claude Code / Codex fast mode differences
- Claude AI Complete Guide
- AI Agent Guide
FAQ
Q: What is Claude Code?
Claude Code is Anthropic’s CLI tool for interacting with Claude directly inside Terminal. It can read and write files, run commands, and search code, making it useful for developers who want AI assistance inside their familiar terminal environment.
Q: Does Claude Code require payment?
Claude Code requires an Anthropic Pro plan ($20/month) or higher, or API billing. Heavy users can consider Max 5x ($100/month) or Max 20x ($200/month), which provide 5x and 20x the usage of Pro.
Q: How is Claude Code different from Cursor?
Claude Code runs in Terminal. It fits developers who are used to CLI workflows, with high flexibility but a higher barrier to entry. Cursor is an IDE with a graphical interface and live preview, better for people who want AI inside the editor. They have different positions and are not simple substitutes.
Q: What is CLAUDE.md, and what is it for?
CLAUDE.md is a configuration file placed at the project root. Claude Code reads it automatically on startup. You can write project rules, code style, and notes in it, so the AI remembers your preferences every time without repeated instructions.
Q: Can Claude Code run scheduled tasks automatically?
Yes. Claude Code supports scheduled tasks, so you can set timed workflows such as daily code audits, content publishing, and data updates.
Q: Which operating systems does Claude Code support?
Claude Code supports macOS and Linux. Windows users can use it through WSL2. Installation requires Node.js 18 or later.
Q: What is MCP in Claude Code?
MCP (Model Context Protocol) lets Claude Code connect to external tools and data sources such as databases, APIs, and browsers. Through MCP, Claude Code’s capabilities can be extended almost without limit.
— Penchan