Skip to content
English
Level 2: Meet Claude
Lesson 3 · +10 XP

Signing in

Claude Code is installed. Before it’ll do anything useful, it needs to know who you are — so Anthropic can connect your usage to your account.

The first time you run claude in any terminal, it opens a browser tab asking you to sign in. After that, it remembers. You don’t sign in again on this machine.

What you’ll see

Pick any folder. Type:

claude

Two things happen at once:

  1. Your terminal sits there with a “waiting for browser” message.
  2. Your default browser opens to an Anthropic sign-in page.

Sign in with your Claude account — the same one you’d use at claude.ai. Claude Code needs a paid plan (Pro, Max, Team, or Enterprise) or API access billed through the Anthropic Console — the free claude.ai tier doesn’t include it. Once you’re signed in, the browser shows a “you can close this tab” message and the terminal lights up — you’re at the Claude Code prompt.

What if I want to use an API key instead?

Some developers prefer to authenticate with an API key — a long secret string that identifies you without a browser flow. This is for people who already manage Anthropic billing through the API console and would rather not log in via the browser.

If that’s not you yet, ignore this option. The Claude-account flow is the default and the simplest.

How it remembers

After the browser flow finishes, Claude Code stores a small credential in a file in your home folder (somewhere under ~/.claude/). Every future claude command reads that and skips straight to the prompt.

If you sign in on a new machine later, you’ll do the browser flow again there. That’s normal. The credential is tied to the computer, not your account.

What’s next

Installed, signed in. Time to actually talk to it.