Claude AI Get started

Getting Started with Claude AI: 10-Minute Path

From a blank terminal to a running Claude AI session in under ten minutes — no prior AI tool experience required.

Rule of thumb

You need three things before the first command: a terminal, Node.js 18 or later, and an API key from your Anthropic account. Run node --version now — if you see v17 or lower, update Node first and come back.

Step 1: Verify your Node.js version

The single most common reason a first install fails is a Node.js version that is one or two releases behind the required floor. Open your terminal and run node --version. You need v18.0.0 or later. If you see something older, update via your package manager: brew upgrade node on macOS, nvm install --lts if you use nvm, or the equivalent for your Linux distribution. Windows users on PowerShell can run winget upgrade OpenJS.NodeJS.LTS.

Do not skip this step. An outdated Node runtime can cause silent failures during the auth flow that look like network errors but are actually module-loading errors. The terminal output rarely tells you the real cause. Two minutes spent on a version check saves thirty minutes of debugging later.

Step 2: Install the Claude Code CLI

With Node confirmed, the install is a single command: npm install -g @anthropic-ai/claude-code. This places the binary on your path globally. On macOS and Linux, that command is sufficient. On Windows in PowerShell, the same command works; if you prefer a Linux shell environment, the WSL route is documented in full on the install claude code page.

Corporate machines sometimes block the npm registry through a proxy. If the install hangs or returns a network error, check your proxy configuration: npm config get proxy and npm config get https-proxy. The install page has a dedicated section on proxy and certificate trust-store setup for locked-down environments — it is the second-most-common blocker after the Node version issue.

Step 3: Set your API key

The CLI authenticates via an environment variable. Export it in your current session: export ANTHROPIC_API_KEY=your_key_here. More importantly, add that same line to your shell profile — ~/.zshrc, ~/.bashrc, or wherever your shell reads startup config — so you do not need to re-export it every time you open a new terminal window. On Windows, set it as a user environment variable through System Properties or via PowerShell: [System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY","your_key","User").

The API key is a secret. Treat it the way you would treat a database password: never commit it to a repository, never paste it into a chat, and rotate it immediately if you believe it has been exposed. The trust and safety page covers credential handling in more depth, including why adding the key to a .env file without also adding that file to .gitignore is a common mistake.

Step 4: Create a .claudeignore file

Before you open a project, create a .claudeignore file in the project root. This file uses the same syntax as .gitignore and tells the CLI which paths to exclude from the context it sends to the API. A minimal starting point for most projects covers four lines: .env, *.pem, *.key, and whatever directory your deployment credentials live in. Commit this file to the repository so every engineer on the team inherits the same exclusions without needing to configure them individually.

Teams working in regulated environments — healthcare, finance, legal — should also exclude any directory that might contain data fixtures, test records, or anything that could be considered personally identifiable information under applicable law. The safest rule is: if you would not paste it into a shared Slack channel, add it to .claudeignore. This step takes two minutes and eliminates a category of risk entirely.

Step 5: Open your project and run a first prompt

Navigate to your project directory and run claude to start a session. The CLI will index the project — this takes a few seconds for small repos and up to a minute for large ones — then present a prompt. For your first interaction, start with a read-only question: ask the tool to summarise what a specific file does, or describe the structure of a particular module. Read the output carefully before you ask it to write or modify anything.

The default model for a new install is Sonnet. That is the right choice for most interactive development tasks. You can switch models mid-session with the --model flag, but Sonnet is the sensible default until you have a specific reason to change it. The models overview explains when Opus or Haiku makes more sense. For research on responsible AI tool use in development workflows, Stanford HAI publishes relevant practitioner-focused material. The NIST AI RMF is the government's framework for structured risk evaluation if your organisation requires a documented approach.

Step Prerequisite Time
1. Verify Node.js version Terminal access 1 minute
2. Install the CLI Node 18+, npm, network access 2 minutes
3. Set API key Anthropic account with an active key 2 minutes
4. Create .claudeignore Project directory 2 minutes
5. First session Steps 1–4 complete 3 minutes

What to do next

A working first session is the starting line, not the finish line. Once the CLI is running, the natural next pages are the claude code overview for a map of the full feature set, and the skills reference if you want to extend the CLI with team-specific workflows. Teams planning a broader rollout should read the for teams page before each engineer installs independently — shared configuration set up early saves a lot of cleanup later.

If the install did not work, the install claude code page has platform-specific troubleshooting sections for each common failure mode. For budget planning, the free tier summary explains the daily usage caps and what a paid plan adds. The models overview is worth reading before you commit to a model choice for a production workflow.

"The .claudeignore step in the getting-started guide is the one thing I wish I had seen before my first install. Two lines of config and I stopped worrying about what was going into context."
— Natasha D. KonstantopoulosFull-Stack Engineer · Mirowire Networks · Stockholm

First-run questions answered

What do I need before installing Claude AI for the first time?

You need a terminal, Node.js version 18 or later, and an API key from your Anthropic account. On Windows, PowerShell or WSL works; on macOS and Linux the standard terminal is sufficient. Run node --version before you start — an outdated runtime is the most common first-install failure. The install claude code page has platform-specific prerequisites listed at the top of each section.

How long does the first Claude AI setup actually take?

On a machine with a current Node.js runtime already installed, the CLI install and first prompt typically takes five to eight minutes. If you need to update Node.js first, add another five minutes. The most common time sink is forgetting to add the API key to your shell profile — not doing so means re-exporting it every session, which is annoying rather than blocking. See the MIT CSAIL developer tools research for broader context on AI-assisted development workflow adoption times.

What should I do if the Claude AI CLI install fails?

The most common causes are an outdated Node.js version, a network proxy blocking the npm registry, and missing write permissions on the global node_modules directory. Run node --version first. If Node is current, check your npm proxy settings with npm config get proxy. If you are on a corporate machine, the install page has a dedicated section on proxy and certificate trust-store configuration. After three different attempts, the contact page routes you to the editorial team who may know the specific failure mode.

Can I use Claude AI without the CLI?

Yes. The web client requires no installation and is a valid first evaluation path. The CLI becomes valuable when you want project-aware context, shell command execution, and the skills extension system — capabilities that the web client does not offer. The free tier summary notes which features are available in each access path, and the models overview applies equally to both the CLI and the web client.

Which model should a first-time Claude AI user choose?

Start with Sonnet. It is the balanced default: fast enough for interactive use, capable enough for most coding tasks, and reasonably priced for a team still evaluating usage patterns. Switch to Opus for tasks requiring extended reasoning across many files, or to Haiku for high-volume batch jobs where speed matters more than quality. The models overview has a side-by-side comparison to inform that decision once you have a few sessions worth of data on your own workload.

Related topics

After the first session, the next logical read is the claude code overview for a map of the full CLI feature set. Teams extending the tool should move to the claude code skills reference, which covers how to package team-specific workflows as reusable extensions. The trust and safety page expands on the .claudeignore step and adds the full picture of access controls, prompt injection risks, and CI/CD configuration. For platform-specific details that go beyond this guide, the install claude code page has Windows, macOS, and Linux paths each documented in full.

For broader orientation, the resource hub maps every page in this reference by user type so you can find the next relevant page without browsing. The models overview is the natural follow-on once you have a session running and want to evaluate whether Sonnet is the right default for your workload. Budget-sensitive readers should check the free tier summary before committing to a plan. The about this reference page explains how content is maintained and when to verify an install step against the current CLI version — useful if this guide and the CLI's own output do not match.

Ready to go deeper?

Once the CLI is running, the models overview is the fastest way to make a confident model choice for your first real project.

Compare the models