Claude Code is an AI-powered coding assistant that operates directly within your terminal. It reads through your codebase, proposes corrections, builds new functionality, executes tests, and manages files by working with your project locally.
This guide covers installation methods, authentication setup, terminal and IDE configuration, and launching your first session. Users can install via native installers, package managers, or npm, with authentication through OAuth or API keys. The tool works with any terminal but offers enhanced features with Warp and IDE extensions for VS Code and JetBrains.
Claude Code Getting Started is the quickest way to bring an AI coding assistant into your terminal. This guide walks through installation, the interactive REPL, permission modes, planning mode, and initializing your first project.

Claude Code Getting Started: What You’ll Learn
In this guide to Claude Code Getting Started, you’ll work through practical, hands-on steps with real examples — explained from the ground up so you can apply it immediately in your own projects.
Understanding Claude Code
Claude Code is an AI-powered coding assistant that operates directly within your terminal — the text-based interface where developers enter commands. Rather than navigating through graphical menus, you simply describe what you need in natural language, and Claude can read through your codebase, propose corrections, build out new functionality, execute tests, and manage files — all by working with your project on your local machine.
Essential Terminology for Terminal Beginners
- Terminal (also referred to as console or command line): a text-based window where you type commands instead of clicking icons. On macOS this is Terminal.app; on Windows it’s Windows Terminal or PowerShell.
- CLI (Command Line Interface): software you operate through typed commands rather than a graphical interface. Claude Code is a CLI application.
- Slash command: a quick shortcut beginning with
/(such as/helpor/config) that triggers a particular action inside Claude Code. - OAuth: a secure login flow that launches your browser so you can sign in without pasting credentials into the terminal.
- API key: a secret token that allows a program to authenticate with a service. It serves as an alternative to OAuth when connecting Claude Code.
- IDE (Integrated Development Environment): a code editor with built-in developer tools — VS Code, IntelliJ IDEA, and PyCharm are well-known examples.
Before you can use any slash command or build a workflow, Claude Code needs to be installed and running on your machine. This lesson guides you through the installation process, authentication setup, choosing the right terminal and IDE configuration, and launching your first session.
System Requirements
Claude Code supports macOS 13+, Ubuntu 20.04+ (along with other modern Linux distributions), and Windows 10 1809+ (natively or through WSL). A minimum of 4 GB of RAM is required, with 8 GB recommended for smooth operation. An active internet connection is needed at all times.
You’ll also need a qualifying Anthropic account — specifically a Pro, Max, Team, Enterprise, or Console plan. The free Claude.ai tier does not include Claude Code access. Alternatively, you can supply an API key from the Anthropic Console or connect through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.
On Windows, when Git for Windows is installed, Claude Code uses Git Bash for the Bash tool. The PowerShell tool is being rolled out gradually as an additional option alongside Bash — set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable it or 0 to disable it.
Installing the CLI
The preferred installation method is the native installer, which handles background auto-updates so you’re always on the latest version.
For macOS or Linux (including WSL):
curl -fsSL https://claude.ai/install.sh | bash
For Windows via PowerShell:
irm https://claude.ai/install.ps1 | iex
For Windows via CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Alternative installation methods are available but require manual updates. Via Homebrew: brew install --cask claude-code (stable channel) or brew install --cask claude-code@latest (latest channel). Via WinGet: winget install Anthropic.ClaudeCode. Via npm: npm install -g @anthropic-ai/claude-code (requires Node.js 18+). On Linux, system package managers also work: sudo apt install claude-code (Debian/Ubuntu), sudo dnf install claude-code (Fedora/RHEL), or apk add claude-code (Alpine).
After installing, verify the installation:
claude --version
For a thorough check of your installation and configuration, run claude doctor — it validates your setup, MCP servers, and settings.
You can control the update channel through /config — choose between latest (newest features) and stable (tested releases, approximately one week behind).
Authentication
When you run claude for the first time, it automatically launches your browser for OAuth authentication. Sign in with your Anthropic account and you’re all set.
If you’re using an API key instead, set the environment variable before launching:
export ANTHROPIC_API_KEY=sk-ant...
For enterprise or cloud provider setups, use the corresponding environment variables:
- Amazon Bedrock:
CLAUDE_CODE_USE_BEDROCK=1 - Google Vertex AI:
CLAUDE_CODE_USE_VERTEX=1 - Microsoft Foundry:
CLAUDE_CODE_USE_FOUNDRY=1
Your credentials are stored securely — in the macOS Keychain on Mac, or in ~/.claude/.credentials.json (mode 0600) on Linux and Windows.
To switch accounts or re-authenticate at any time, use /logout. You can also explicitly trigger authentication with claude auth login — it opens the browser OAuth flow, or if the browser can’t open, prints a URL you can paste into any browser and then paste the authorization code back into the terminal. Additional options include claude auth login --email to pre-fill your email, claude auth login --sso for SSO-enabled organizations, and claude auth login --console for API key authentication through the Anthropic Console.
Your Terminal: Warp Recommended
Claude Code works in any terminal — Terminal.app, iTerm2, Windows Terminal, Alacritty, Kitty, Ghostty, and more. But for the best experience, we recommend Warp.
Warp has an official Claude Code plugin that provides native desktop notifications when Claude completes a task, needs your input, or requests permissions. This is especially useful for long-running operations where you switch to another window.
To set up the Warp plugin, run these commands inside Claude Code after installation:
/plugin marketplace add warpdotdev/claude-code-warp
/plugin install warp@claude-code-warp
Restart Claude Code after installation to activate the plugin. You’ll get native OS notifications for task completions, idle states, and permission requests — no more checking back manually.
By default, Claude Code only sends desktop notifications in Ghostty, Kitty, and iTerm2. In any other terminal, set preferredNotifChannel to "terminal_bell" to ring the terminal bell instead, or configure a Notification hook for a custom sound. Shift+Enter for a newline also works without setup in most terminals; in VS Code, Cursor, Devin Desktop, Alacritty, and Zed, run /terminal-setup once to write that keybinding.
By default, Claude Code uses the terminal’s alternate screen for a fullscreen rendering experience. If you prefer to keep the conversation in your terminal’s native scrollback (useful for screen readers, terminal multiplexers, or piping output), set CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 before launching.
IDE Extensions
Claude Code started as a CLI tool, but it now has official extensions for major editors. You can use both — the CLI for heavy terminal work and the extension for in-editor convenience.
VS Code is the most mature integration. Install it from the VS Code Marketplace or run code --install-extension Anthropic.claude-code. It gives you a native graphical interface, visual diff review, file references, conversation history, and the ability to run multiple conversations in tabs.
JetBrains has an official plugin in beta, available in the JetBrains Marketplace for IntelliJ IDEA, WebStorm, PyCharm, and other JetBrains IDEs. It orchestrates the CLI with the IDE’s diff viewer for a seamless experience.
Cursor, Devin Desktop (renamed from Windsurf in v2.1.162), and Kiro are VS Code forks that support the VS Code extension and the integrated terminal. In VS Code, Cursor, and Devin Desktop, /terminal-setup turns off the integrated terminal’s GPU acceleration (to prevent garbled text) and adjusts its scroll sensitivity for smoother fullscreen scrolling, and /ide and /scroll-speed use the new Devin Desktop label too.
Beyond IDE extensions, there’s also a Desktop App for macOS and Windows (not available on Linux — use the CLI instead) that provides visual diffs, live app preview, and autonomous background agents — no terminal needed. And Claude Code on the Web (claude.ai/code) is a research preview that runs on cloud VMs, so you can work from any browser without any local setup.
Your First Session
Navigate to any project directory and launch Claude Code:
cd my-project
claude
You’ll see a welcome message and a prompt. Just type what you want Claude to do in plain English. You can also paste images with Ctrl+V — a “Pasting…” hint appears in the footer while the image is being read from the clipboard:
What files are in this project and what does it do?
Claude will read your files, analyze the structure, and give you a summary. From here, you can ask it to make changes, fix bugs, run tests, or explain code. When Claude needs to perform actions like editing files or running commands, it will ask for your permission first.
That’s it — you’re ready. Head to the next module to learn the slash commands that make Claude Code truly powerful.
Pro Tips
- Run
/initon every new project. It generates aCLAUDE.mdthat gives Claude persistent context about your codebase — this single step dramatically improves response quality across sessions. - Be specific in your prompts. Instead of “fix the bug”, say “the login form on /auth returns a 500 error when the email field is empty — find and fix the cause”. Specificity narrows Claude’s search space and produces better results.
- Use
/clearbetween unrelated tasks. Claude Code’s context window is finite. Clearing the conversation prevents unrelated context from bleeding into your next task. - Review every file diff before accepting. Claude Code always shows you what it plans to change. Make this a habit — it catches misunderstandings early and keeps you in control.
- Keep Claude Code updated. New features and fixes ship frequently. Run
npm update -g @anthropic-ai/claude-coderegularly, or check the version with/status.
Hands-On Challenge: Set Up Your First Claude Code Session
Task: Install Claude Code, initialise a project, and have Claude create a simple “Hello World” application from scratch.
Steps
- Install Claude Code globally via npm:
npm install -g @anthropic-ai/claude-code - Create a new directory for your project and
cdinto it - Launch Claude Code and run
/initto generate a starterCLAUDE.md - Ask Claude to “create a simple Node.js script that prints Hello World and includes a README”
- Review the files Claude generates and ask one follow-up question (e.g., “add a command-line argument for a custom greeting”)
Expected Outcome
You should have a working index.js (or equivalent) that runs without errors, a populated CLAUDE.md in the project root, and a README describing the project.
Hint: If Claude asks for permission to run commands, type
yto allow. You can always type/helpto see available commands at any time.
Knowledge Check: Getting Started with Claude Code
Test your understanding with these quiz questions. Try to answer each question before revealing the answer.
1. What are the two primary modes of the Claude CLI?
- Online and offline mode
- Interactive REPL (claude) and Print mode (claude -p)
- GUI and terminal mode
- Single and batch mode
Correct Answer: B. Interactive REPL is the default conversational mode. Print mode (-p) is non-interactive, scriptable, pipeable. It exits after one response.
2. How do you pipe a file into Claude and get JSON output?
- claude –file error.log –json
- cat error.log | claude -p –output-format json “explain this”
- claude < error.log –format json
- claude -p –input error.log –json
Correct Answer: B. Pipe content via stdin to print mode (-p) and use –output-format json for structured output.
3. What are the six permission modes in Claude Code?
- read, write, execute, admin, root, sudo
- default, acceptEdits, plan, auto, dontAsk, bypassPermissions
- safe, normal, elevated, admin, unrestricted, god
- view, edit, run, deploy, full, bypass
Correct Answer: B. The six modes are: default (prompts), acceptEdits (auto-accepts file edits), plan (read-only analysis), auto (background classifier decides), dontAsk (auto-denies unless pre-approved), bypassPermissions (skips all checks).
4. How do you activate planning mode?
- Only via /plan command
- Via /plan, Shift+Tab/Alt+M, –permission-mode plan flag, or default config
- Via –planning flag only
- Planning is always on
Correct Answer: B. Planning mode can be activated via /plan command, Shift+Tab/Alt+M keyboard shortcut, –permission-mode plan CLI flag, or as a default in config.
5. What does the /init command do?
- Initializes a new Claude Code project from scratch
- Generates a template CLAUDE.md based on your project structure
- Resets all memory to defaults
- Creates a new session
Correct Answer: B. /init analyzes your project and generates a template CLAUDE.md with suggested rules and standards. It is a one-time bootstrapping tool.
Test Your Knowledge
Additional Resources
| Resource | Type | Link |
|---|---|---|
| Claude Code — Installation Guide | Official Docs | code.claude.com/docs/en/install |
| Claude Code — Quickstart | Official Docs | code.claude.com/docs/en/quickstart |
| Claude Code — Interactive Mode | Official Docs | code.claude.com/docs/en/interactive-mode |
| Claude Code — CLI Reference | Official Docs | code.claude.com/docs/en/cli-reference |
| Anthropic API Keys | Console | console.anthropic.com |
| Claude Code Changelog | GitHub | CHANGELOG.md |
How long does it take to get productive?
Most developers are productive within a single session. Claude Code Getting Started is deliberately gentle: install, open a project, ask a question, and approve a small change in planning mode.
Can I undo what the assistant changes?
Yes. Because it edits files in your real project, your version control is your safety net. Commit before large changes and review diffs like any pull request.
Does it work with my language or framework?
It works with whatever is in your project folder, since it reads your actual files rather than relying on a fixed list of supported stacks.
Claude Code Getting Started: Frequently Asked Questions
What does it actually do?
Claude Code is a command-line AI assistant that reads the files in your project directory and helps you write, review, and edit code with full awareness of your actual codebase, rather than working from pasted snippets alone.
How do I install it and start my first session?
Install the CLI, then open a terminal inside a real project folder before launching it — the assistant only sees the directory you run it from. Your first prompt can simply ask it to summarise the project to confirm it can read your files.
What is planning mode and when should I use it?
Planning mode has the assistant propose a plan before touching any files, so you can review and approve the approach first. Use it for anything non-trivial; it turns a black-box edit into a reviewable proposal while you build trust in the tool.
Why should I record build, test, and lint commands in project memory?
Once those commands are recorded, the assistant can run them itself after making a change, catching mistakes early and handing you a change that is already verified instead of one you have to debug from scratch.
Is it safe to let it make changes directly to my codebase?
Yes, if you commit before big changes and treat every edit as a reviewable diff. Avoid jumping straight to permissive modes before you understand how it behaves on your specific codebase.
Claude Code Getting Started gives you a solid, repeatable workflow. Bookmark this Claude Code Getting Started guide and revisit the steps whenever you need them.
Your First Session: A Quick Walkthrough
Once the CLI is installed, open a terminal inside a real project folder and launch it. The assistant reads the files in that directory, so it can answer questions about your actual code from the very first prompt instead of working in the abstract.
Start by asking it to summarise the project. A request like “explain what this repository does and how the main pieces fit together” gives you a fast orientation and confirms the assistant can see your files. This is also a safe, read-only way to check that permissions are set the way you expect.
For your first real change, switch to planning mode. Describe the outcome you want, review the plan the assistant proposes, and approve it before any file is touched. Planning mode turns a black-box edit into a reviewable proposal, which is exactly what you want while you are still building trust in the tool.
After the change lands, ask the assistant to run your test and lint commands. If you recorded those commands in your project memory, it will know how to verify its own work, catch mistakes early, and hand you a change that is ready to review rather than one you have to debug from scratch.
Claude Code Getting Started: Common Mistakes to Avoid
Even developers who read the docs carefully make a handful of predictable mistakes the first week they use Claude Code. Watching for these early saves real frustration later.
- Running
claudeoutside a real project directory, then wondering why it has no context — Claude Code reads whatever folder you launched it in, socdinto your project first. - Skipping
/initon a new project and re-explaining the same tech stack and conventions every session instead of lettingCLAUDE.mdpersist that context. - Jumping straight to
bypassPermissionsmode to avoid approval prompts, which removes the safety net before you have learned how Claude behaves on your codebase. - Letting one session sprawl across unrelated tasks instead of running
/clearbetween them, which lets stale context from an earlier task bleed into unrelated work.
Claude Code Getting Started: Best Practices
- Install the CLI globally and run it inside a real project folder so it can read your code and configuration.
- Start in planning mode for non-trivial tasks so you can review the approach before any files change.
- Use the most permissive mode you are comfortable with to cut prompts, but keep destructive actions gated.
- Create a CLAUDE.md early so the assistant remembers project conventions across sessions.
- Keep each session focused on one task; start a fresh session when you switch context.