Most developers open Claude Code for the first time, type a vague question, and close the terminal five minutes later unimpressed. The tool works the same way a capable teammate would: it reads your actual files instead of guessing, and it gets noticeably better once you know which commands exist and how the permission system decides what it can touch. This guide covers installation through your first real task, then points to the deeper reference for each advanced feature once you are ready to use it.
- Install (macOS/Linux/WSL):
curl -fsSL https://claude.ai/install.sh | bash - Install (Windows PowerShell):
irm https://claude.ai/install.ps1 | iex - Verify install:
claude --version - Start a session:
cd your-projectthenclaude - Persistent project rules:
CLAUDE.mdin the project root - Switch permission mode mid-session:
Shift+Tab
Installing Claude Code
The native installer is the recommended path on macOS, Linux, and WSL: curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex instead; if that command fails with 'irm' is not recognized, the prompt is actually CMD, not PowerShell. Native installs update themselves in the background, so there is no separate upgrade step to remember.
Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) are also supported, along with apt, dnf, and apk on Linux distributions that use them. These package-manager installs do not auto-update, so run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode periodically to stay current. Whichever method you pick, confirm it worked with claude --version, which prints a version number followed by (Claude Code).
On native Windows, installing Git for Windows first is worth doing, since Claude Code uses it to run the Bash tool. Without it, Claude Code falls back to PowerShell as the shell tool, which behaves slightly differently for some commands.
Logging In and Starting Your First Session
Open a terminal in a project folder and run claude. On first use, you are prompted to log in through your browser with a Claude Pro, Max, Team, or Enterprise subscription, or a Claude Console account. If you have set the ANTHROPIC_API_KEY environment variable instead, Claude Code skips the login prompt and asks you to approve that key instead.
Credentials are stored locally after the first login, so you will not see that prompt again on the same machine. To switch accounts or re-authenticate later, type /login inside a running session.
Once you are in, the prompt shows the current model and working directory above the input line. Type /help to see the full command list, or /resume to pick up a conversation from a previous session instead of starting fresh.
Your First Project: Exploring, Editing, and Committing
Before asking for a code change, let Claude read the project first. Plain questions work fine here, no special syntax needed:
what does this project do?
where is the main entry point?
explain the folder structureClaude Code reads whatever files it needs to answer, so there is no manual step for adding context. Once you have a feel for the codebase, ask for a small, concrete change rather than something vague. "Add input validation to the user registration form" gives Claude enough to locate the right file and implement something reasonable on the first try; "make the forms better" does not.
Git operations work the same conversational way. Asking "what files have I changed?", "commit my changes with a descriptive message", or "create a new branch called feature/login-fix" gets handled without you touching git syntax directly. For a debugging pass, paste the actual error message or describe the symptom precisely ("users can submit empty forms") and let Claude trace it through the codebase rather than describing the fix yourself.
Whether each of those actions runs immediately or waits for your approval depends on the active permission mode. On Pro, Max, and Team plans, interactive terminal sessions now start in Auto mode by default: a background classifier reviews each action and blocks anything that looks destructive or off-task, so most edits and commands proceed without a prompt. Other plans start in Manual mode, where every edit and command asks first. Press Shift+Tab at any point to cycle between modes, and see Claude Code's permission modes for the full breakdown of what each one allows and when to pick a stricter one, like before a production deploy.
CLAUDE.md and Auto Memory
Repeating your tech stack, folder conventions, or house style at the start of every session is wasted typing. Drop a CLAUDE.md file in your project root and Claude Code reads it automatically at the start of every session from that point on; running /init generates a starting version by scanning the repository for conventions worth recording. Keep it short: a few lines on your actual architecture decisions and non-obvious constraints outperform a long list of generic rules Claude would have inferred anyway.
Beyond that static file, Claude Code also builds auto memory as it works, saving what it learns about the project across sessions without you writing anything down yourself. For a project that needs to track longer-running state than a single markdown file comfortably holds, like open decisions or task history, persistent local memory for AI coding agents covers a SQLite-based approach that goes further than the built-in system.
Extending the Workflow: Commands, Hooks, MCP, and Skills
Once the basic loop of ask, review, commit feels natural, four extension points cover almost everything else Claude Code can be configured to do.
Slash commands are the interface for both built-in actions (/clear, /compact, /model) and your own custom shortcuts. Typing / shows every command available in the current session, including ones your team has defined as reusable skills. Claude Code slash commands explained breaks down which built-ins matter daily and how to write your own.
Hooks turn a rule you keep repeating into something enforced automatically rather than merely suggested. A PreToolUse hook can block a commit to main outright; a PostToolUse hook can run a linter after every edit and hand Claude the errors to fix before moving on. Claude Code hooks walks through the exact configuration and the pitfalls that trip people up first, like exit codes that silently fail to block anything.
MCP (Model Context Protocol) servers give Claude tool-shaped access to systems outside your local files: a database, an issue tracker, a browser it can drive itself. Connecting one takes a single claude mcp add command or a few lines in .mcp.json, and Claude Code MCP servers setup covers the scope options and the config mistakes that cause a server to fail silently.
Skills and subagents package a repeatable procedure, like reviewing a pull request or deploying to staging, into something the whole team can invoke the same way. Subagents take that further by running as separate, isolated sessions that a lead agent coordinates and merges results from, useful when a task splits cleanly into independent pieces. Custom skills and subagents in Claude Code covers how to structure both.
For the full built-in command reference, including the ones that handle rollbacks and reviewing a diff before it lands, Claude Code commands goes deeper than the handful covered here.
Running Claude Code Beyond the Terminal
The terminal is the original surface, but the same engine now runs in a VS Code extension, a standalone desktop app, JetBrains IDEs, and directly in the browser at claude.ai/code, all sharing the same CLAUDE.md files, settings, and MCP connections. That matters most when a task does not fit neatly into a single sitting at your desk: kick off a long-running job from the web interface and check back later, or start locally and continue from your phone.
Claude Dispatch is the mobile side of that same idea, letting you message a task to Claude from your phone and have it open as a session on your desktop machine when you get back to it. None of this changes what Claude Code actually does; it just moves where you're sitting when you ask.
Picking Claude Code Over Other Coding Agents
Claude Code is not the only agentic coding tool on the market, and it is not automatically the right one for every budget or workflow. Terminal-based, git-native tools like this one trade a GUI for direct file access and faster execution, while other products optimize for a visual diff review or a lower price per task. If you are still deciding what to standardize on, the most cost-effective AI coding agents compares Claude Code against Cursor, Windsurf, and similar tools on actual usage cost rather than marketing claims.
Once you have picked a tool, the fastest way to get comfortable is the same for any of them: start with small, well-described tasks, read what changed before accepting it, and add automation like hooks or custom skills only once you notice yourself repeating the same instructions.

