How to install and use Claude Code CLI: Anthropic login, first repo coding task

Install claude, sign in with Anthropic, and finish one small repo task you can verify with git diff.

To run your first repo task with Claude Code CLI, finish four steps: official install, Anthropic login (subscription or Console), start a session in a git repo, then review and approve a small change.

Facts follow docs.anthropic.com/en/docs/claude-code/overview and docs.anthropic.com/en/docs/claude-code/quickstart. Queries: Claude Code CLI install, Claude Code login. For a short huddle see sitdraw and create and join a room.

InstallSign inFirst task

Browser login vs API key

Browser auth

On first claude run, complete Claude Pro/Max/Team/Enterprise or Claude Console in the browser; type /login inside a session to switch accounts.

ANTHROPIC_API_KEY

If the env var is set, Claude Code may ask to use it and skip the browser prompt when you approve. Never commit keys.

claude --versionVerify install
/loginRe-auth
Shift+TabPermission mode
GoalEntryFirst-hour check
Installcurl -fsSL https://claude.ai/install.sh | bash, Homebrew, WinGetclaude --version prints a version
Sign inFirst claude or /loginPrompt accepts read-only questions
Explorewhat does this project do?Summary matches your repo
First editOne-file README or comment tweakgit diff matches intent

Install, login, first coding task

  1. 01
    Install Claude Code CLI

    macOS/Linux/WSL: curl -fsSL https://claude.ai/install.sh | bash (native installs auto-update). Or brew install --cask claude-code, Windows winget install Anthropic.ClaudeCode. Open a new terminal and run claude --version. On native Windows, Git for Windows is recommended for the Bash tool.

  2. 02
    Anthropic login

    cd to your project root and run claude. Sign in with a Claude subscription or Claude Console in the browser, or approve ANTHROPIC_API_KEY when prompted.

  3. 03
    Explore read-only first

    Ask what does this project do? or where is the main entry point?. Optional: add CLAUDE.md at the repo root for team rules.

  4. 04
    First small change

    Request a one-line README update or comment-only edit. Review diffs before accepting; use Shift+Tab to cycle permission modes. Verify with git diff.

# First hour · Claude Code CLI · 2026-10
# curl -fsSL https://claude.ai/install.sh | bash
# cd my-repo && claude
# Docs: docs.anthropic.com/en/docs/claude-code/quickstart
Compare Codex CLI or OpenCode?
See our Codex CLI guide and OpenCode CLI guide.
Command not found?
Open a new terminal after install; see Fix your PATH in the docs.
CLAUDE.md required?
Optional but recommended for persistent project instructions.
Whiteboard?
Open sitdraw for diagrams.

Sign in, then approve small diffs

Keep the first task tiny; use Shift+Tab to understand permission modes.

Start the picture