Anthropic's official agentic coding CLI: runs in terminals and IDEs, handles git workflows, extends via plugins, and integrates with GitHub via @claude mentions.
Claude in a browser chat can describe what to do but cannot actually do it. Claude Code runs in your terminal and IDE with direct access to your codebase, the ability to run tests and builds, full git history, and GitHub integration via @claude mentions in PRs and issues. An extensible plugin system lets you install community skills and build your own. Multi-platform support across macOS, Linux, and Windows makes it the foundation every other tool in this library builds on.
Steps
The current installer is a one-line script: no Node.js, no npm. Mac, Linux, and WSL use a curl command; Windows uses PowerShell. Mac users can also use Homebrew; Windows users can use winget. Verify with `claude --version` after install.
Always run `claude` from your project root, not from your home directory. Claude Code reads the directory it starts in as its working context. On first run it will prompt for your Anthropic API key.
Before you write CLAUDE.md, ask Claude Code to orient you. The three answers (what it is and what beats a regular chat, what it can see and change vs what it cannot touch, the one habit that keeps you out of trouble) save you a week of guesswork. Run this in your project root after the first authenticated session.
CLAUDE.md is the most important file you will write. It is read at every session start and tells Claude Code how your project is structured, which conventions to follow, and what it should never do. Without it you re-explain your project every session.
Four commands matter most at the start: `/clear` resets context when a session drifts. `/compact` compresses long sessions to save tokens. `/checkpoint` writes a state file so you can resume exactly where you stopped. `/model` switches the underlying model without restarting. These four cover the majority of session management you will encounter.
Claude Code has a Memory tool that stores preferences across sessions, not just within one conversation. Tell it once how you want emails drafted, what voice to use, or what format you prefer. Then ask where it was saved so you can verify the preference is locatable, not vaporware.
Before implementing any agentic capability (tool use, memory, multi-file editing, git operations), verify Claude Code does not already have it. The CLI is updated frequently. This prompt evaluates any build-vs-integrate decision before you write a line of custom infrastructure.
How do you know it worked?
If something looks off
Skills & Commands Reference
Core Claude Code CLI commands and launch flags you'll use in every session.
| Command / Skill | What it does | When to use it |
|---|---|---|
claude | Start an interactive session in the current directory | Beginning any coding task from the terminal |
claude -p "..."advanced | Headless one-shot prompt, runs, prints output, exits | Scripting, CI pipelines, or chaining Claude with other shell tools |
--allowedToolsadvanced | Restrict which tools a sub-agent is permitted to call | Security-sensitive automation or minimal-permission worktrees |
--permission-modeadvanced | Set trust level: acceptEdits, bypassPermissions, or plan | Walkaway runs (acceptEdits) or fully trusted autonomous sessions |
/clear | Reset the conversation context to zero | Switching tasks or when context budget approaches 80% |
/compact | Compress the current conversation into a summary to free context | Long sessions approaching the limit without a full reset |
/memory | View and manage memory entries for the current session | Auditing what Claude currently knows before a complex task |
CLAUDE.md | Persistent instruction file read at every session start | Encoding project conventions, stack, and hard rules once instead of every session |
Hooksadvanced | Shell scripts that fire on PreToolUse, PostToolUse, Stop, and Notification events | Enforcing gates, logging agent actions, or triggering side-effects automatically |
MCP serversadvanced | Extend Claude's toolset with custom tools via Model Context Protocol | Connecting Claude to databases, APIs, or internal systems |
/plugin | Install, list, and manage skill plugins from the marketplace or GitHub | Adding community skills or installing tools from this resource library |
@claude (GitHub)advanced | Mention @claude in a GitHub PR or issue to trigger a Claude Code review or task | Async code review without starting a local session, works directly in GitHub |