EN

Language

Our editions

Written for each audience, not translated word for word.

How to use Claude Code: a beginner's guide

How-toBy Lucas Matías García TorresUpdated (first published )Data checked 6 min read

Reviewed by Lucas Matías García Torres on . How we work.

Leer en español

A dark mechanical keyboard with three edge-lit glass tiles floating above it

Short answer

Install Claude Code with one command (curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL; irm https://claude.ai/install.ps1 | iex on Windows PowerShell), log in with a Claude subscription, Console account or cloud provider, run claude in your project folder and ask questions before you ask for changes. The essential commands are claude, claude -p, claude -c and /clear, and /init creates a CLAUDE.md with your project's commands and conventions. Claude Code is included in paid Claude plans, not in the free plan.

Prices and limits change often: check the vendor's page before you pay. How we make money.

How to use Claude Code: install it with one command, log in, start a session in your project folder with claude and ask for what you want in plain language. Claude Code is Anthropic's coding agent: it reads your project, edits files, runs commands and works with Git from the terminal, and it also runs in VS Code and JetBrains, on the web and in a desktop app. This guide follows Anthropic's own quickstart and memory documentation, checked on October 6, 2026, and adds practical notes of our own where we say so. For what it costs and how it compares with other tools, see Claude pricing and Claude Code vs Cursor.

What do you need before you start?

Anthropic lists three requirements: a terminal or command prompt, a code project to work on and an account, in one of these forms: a Claude subscription (Pro, Max, Team or Enterprise), a Claude Console account, or access through a supported cloud provider. The free Claude plan does not include Claude Code. If you have never used a terminal, Anthropic has a terminal guide that shows how to open one and paste a command.

Step 1: install Claude Code

Run the command for your system. These are the native install commands in Anthropic's quickstart:

Table: install commands

System Command
macOS, Linux, WSL curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell irm https://claude.ai/install.ps1 | iex
Windows CMD curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Homebrew and WinGet are also supported, and on Debian, Fedora, RHEL and Alpine you can use apt, dnf or apk. When the installer finishes, open a new terminal window and run claude --version: a working installation prints a version number. If your shell says claude is not found, the install folder is not on your PATH yet, and Anthropic's documentation has a fix. On native Windows, Anthropic recommends installing Git for Windows so Claude Code can use the Bash tool; without it, Claude Code uses PowerShell instead. Native installations update themselves in the background. A common mix-up: if you see "The token '&&' is not a valid statement separator", you are in PowerShell, not CMD, and if you see "'irm' is not recognized", you are in CMD, not PowerShell.

Step 2: log in

Start the program with claude and follow the prompts to sign in through your browser on first use. If you have set the ANTHROPIC_API_KEY environment variable, Claude Code skips the login prompt and asks you to approve the key. To switch accounts later, type /login inside a session. Anthropic lists these account types: Claude Pro, Max, Team or Enterprise (recommended), the Claude Console (API access with pre-paid credits, which creates a "Claude Code" workspace for cost tracking), and Amazon Bedrock, Google Cloud or Microsoft Foundry for organizations.

Step 3: start your first session

Open your terminal in the project folder and start Claude Code:

cd /path/to/your/project
claude

You will see a prompt with the version, the current model and the working directory. Type /help for the available commands or /resume to continue a previous conversation.

Step 4: ask questions before you change anything

The best first prompts are questions: "what does this project do?", "what technologies does this project use?", "where is the main entry point?" or "explain the folder structure". Claude Code reads your project files as needed, so you do not have to paste context in by hand. You can also ask it about its own capabilities, for example "what can Claude Code do?".

Step 5: make your first change

Ask for a small task, such as "add a hello world function to the main file". Claude Code finds the right file and shows the change. If it asks first, choose Yes to approve. Which actions need your approval depends on the permission mode. According to the quickstart, with Claude Code version 2.1.283 or later, auto mode is the starting permission mode in interactive terminal sessions: a classifier reviews actions instead of you, and Claude edits most files and runs most commands without asking; on earlier versions it applies to Pro, Max and Team plans. Your settings or your organization can set a different starting mode, and Shift+Tab switches the mode of the current session at any time. Our advice: until you trust a project's setup, start in a mode that asks you to approve changes, work on a Git branch and read every change before you commit.

Step 6: use Git by talking to it

Claude Code makes Git conversational: "what files have I changed?", "commit my changes with a descriptive message", "create a new branch called feature/quickstart", "show me the last 5 commits" and "help me resolve merge conflicts" are all examples from the documentation.

Fix a bug, add a feature, refactor, test

Describe what you want in natural language: "add input validation to the user registration form" or "there's a bug where users can submit empty forms - fix it". Claude Code locates the relevant code, understands the context, implements a solution and runs tests if available. Anthropic's list of common tasks also includes refactoring ("refactor the authentication module to use async/await instead of callbacks"), writing tests, updating documentation and code review ("review my changes and suggest improvements").

The commands you will use every day

Table: essential commands

Command What it does
claude Starts an interactive session
claude "task" Starts a session with an initial prompt, for example claude "fix the build error"
claude -p "query" Runs a one-off query, then exits, for example claude -p "explain this function"
claude -c Continues the most recent conversation in the current directory
claude -r Resumes a previous conversation
/clear Clears the conversation history
/help Shows the available commands
/exit or Ctrl+D twice Exits Claude Code

Teach it your project with CLAUDE.md

Each Claude Code session begins with a fresh context window. Two mechanisms carry knowledge across sessions: CLAUDE.md files, which you write, and auto memory, notes Claude writes itself from your corrections and preferences. Anthropic says to treat CLAUDE.md as the place where you write down what you would otherwise re-explain, such as build commands, conventions, project layout and "always do X" rules, and to add to it when Claude makes the same mistake twice or when a new teammate would need the same context.

Files can live at several scopes: your own ~/.claude/CLAUDE.md for all projects, a shared ./CLAUDE.md (or ./.claude/CLAUDE.md) for the project, and a private ./CLAUDE.local.md that you keep out of Git. Run /init to generate a starting file: Claude analyzes your codebase and writes the build commands, test instructions and conventions it finds. Anthropic's guidance on writing it: make instructions concrete enough to verify ("Use 2-space indentation", not "Format code properly"; "Run npm test before committing", not "Test your changes"), keep each file under about 200 lines because longer files consume context and reduce adherence, group instructions under headers, and remove instructions that contradict each other. Claude treats these files as context, not enforced configuration.

Tips for beginners

Anthropic's own short list: be specific with your requests, use step-by-step instructions, let Claude explore first and save time with keyboard shortcuts. Treat Claude "like a helpful colleague": say what you want to achieve. The same ideas that make any prompt work apply here; see our guide to prompt engineering. Because Claude Code is an agent that acts on your files, read what an agent is for the risks, and how it connects to other tools in what MCP is.

How much does it use of your plan?

Claude Code is included in every paid Claude plan and shares the plan's usage limits with your chats, so long coding sessions use the same balance as conversations. When you reach a limit, you can wait for the reset, move up a plan or turn on usage credits at API rates; the details are in Claude pricing.

What we checked

  • Claude Code quickstart: requirements are a terminal, a code project and a Claude subscription (Pro, Max, Team or Enterprise), Claude Console account or supported cloud provider; native install commands are curl -fsSL https://claude.ai/install.sh | bash (macOS, Linux, WSL), irm https://claude.ai/install.ps1 | iex (Windows PowerShell) and a curl-based command for Windows CMD; Homebrew and WinGet are supported, and apt, dnf and apk on Debian, Fedora, RHEL and Alpine; claude --version checks the installation; Git for Windows is recommended on native Windows; native installations update automatically; login with claude on first use, /login to switch accounts, ANTHROPIC_API_KEY skips the login prompt; account types include Claude Pro, Max, Team, Enterprise, Claude Console and cloud providers; /help, /resume; example prompts for questions, changes, Git, bug fixes, refactoring, tests, documentation and code review; with Claude Code v2.1.283 or later, auto mode is the starting permission mode for interactive terminal sessions and Shift+Tab switches modes; essential commands claude, claude "task", claude -p, claude -c, claude -r, /clear, /help, /exit. (Anthropic, )
  • CLAUDE.md and auto memory: each session starts with a fresh context window; CLAUDE.md files are instructions you write and auto memory is notes Claude writes itself; scopes are managed policy, user (~/.claude/CLAUDE.md), project (./CLAUDE.md or ./.claude/CLAUDE.md) and local (./CLAUDE.local.md); /init generates a starting CLAUDE.md; instructions should be concrete enough to verify, files should stay under about 200 lines, contradictory instructions should be removed; Claude treats the files as context, not enforced configuration. (Anthropic, )
  • Claude Code is an agentic coding tool available in the terminal, IDEs, a desktop app and the browser; most surfaces require a Claude subscription or Console account. (Anthropic, )
  • Claude Code is included in all paid Claude plans and shares their usage limits; the free plan does not include it. (Anthropic, )

What may change

  • Claude Code ships updates often, including install commands, permission modes and commands; this page is reviewed monthly and every change is logged below.
  • Which permission mode a session starts in depends on the version, the plan, your settings and your organization.

Frequently asked questions

How do I install Claude Code?

On macOS, Linux and WSL run curl -fsSL https://claude.ai/install.sh | bash; on Windows PowerShell run irm https://claude.ai/install.ps1 | iex. Homebrew, WinGet, apt, dnf and apk are also supported. Open a new terminal and run claude --version to check that it worked.

Do I need a paid plan to use Claude Code?

You need a Claude subscription (Pro, Max, Team or Enterprise), a Claude Console account or access through a supported cloud provider. The free Claude plan does not include Claude Code. It is included in all paid plans and shares their usage limits.

What is CLAUDE.md?

A markdown file with persistent instructions that Claude reads at the start of every session: build and test commands, conventions, project layout and rules. It can be personal (~/.claude/CLAUDE.md), shared with the project (./CLAUDE.md) or private to you in the project (./CLAUDE.local.md). Run /init to generate a starting file.

What are the main Claude Code commands?

claude starts a session, claude "task" starts it with a prompt, claude -p "query" runs a one-off query, claude -c continues the latest conversation and claude -r resumes an earlier one. Inside a session, /help lists commands, /clear clears the conversation, /resume continues a previous one and /exit leaves.

Does Claude Code change my files without asking?

It depends on the permission mode. According to Anthropic's quickstart, in version 2.1.283 or later, auto mode is the starting mode in interactive terminal sessions: a classifier reviews actions and Claude edits most files and runs most commands without asking. Shift+Tab switches the mode in a session. Working on a Git branch and reviewing changes before committing is a sensible habit.

Can I use Claude Code in VS Code or on the web?

Yes. Besides the terminal, Anthropic lists the web, a desktop app, VS Code and JetBrains IDEs, Slack and CI/CD with GitHub Actions and GitLab. Most surfaces need a Claude subscription or a Console account.

Sources

  1. Claude Code quickstart: install, log in, first session, essential commands, Anthropic. Accessed October 6, 2026.
  2. How Claude remembers your project: CLAUDE.md files and auto memory, Anthropic. Accessed October 6, 2026.
  3. Claude Code overview: what it is, where it runs and how to install it, Anthropic. Accessed October 6, 2026.
  4. Claude plans and pricing (Free, Pro, Max, Team, Enterprise), Anthropic. Accessed October 6, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : Wording revised; no figure, date or source changed.
  • : First published from Anthropic's Claude Code quickstart, overview and memory documentation.

Next review: .

Part of our Coding Assistants guide.

Other topics