Skip to content

Installation and First Session

Claude Code has a couple of supported install paths — most commonly npm install -g @anthropic-ai/claude-code, or a native installer script for your OS. Both are fine; check the current docs for whichever is fastest on your machine today, since the recommended path has shifted before and will probably shift again.

Once it’s installed, run claude from inside any project directory to start.

Before you type anything: Claude Code is a steering wheel, not an autopilot — you stay in the loop and review what it produces, you don’t just vibe your way to “done.” (Full framing is on the home page if you haven’t read it yet.)

There’s more than one way to launch claude, depending on what you’re trying to do:

Ways to start a session

Command Effect
claude / claude "my prompt" Start a new session, with an optional initial prompt
claude -p "my prompt" One-shot query, no interactive session, just returns the response
claude -c Continue/resume your most recent session
claude --agent DocsExplorer Start with a specific custom agent active
claude --permission-mode plan Start straight into Plan Mode
claude --remote "Add dark mode" Start a remote (cloud) session

claude -p is worth calling out separately: it’s for scripting and quick lookups, not for actual work. If you want to have a conversation and iterate, use a regular interactive session.

Here’s a small, realistic run: asking for a feature, Claude reading a file and proposing a change, a permission prompt, and wrapping up with /compact.

claude

Notice the shape: Claude reads before it writes, it asks before it touches a file for the first time in that session, and /compact keeps the context window lean once a task is done. That rhythm — read, propose, confirm, act — is most of what you need to know to get started.