The Claude Code CLI is built for developers who want an agent inside the terminal — close to git, build tools, and SSH sessions. Setup is straightforward, but small environment mistakes (PATH, auth tokens, wrong working directory) cause most first-day friction.

When CLI beats desktop

Choose CLI if you already work in tmux, remote VMs, or CI-like local scripts. Desktop shines for visual diff review; CLI shines for repeatable commands, scripting, and headless servers.

Installation overview

  1. Install via the method shown on claude.com/download for your OS.
  2. Open a new terminal so PATH updates apply.
  3. Run the login flow and confirm identity in the browser if prompted.
  4. cd into a git repo — agents work best with project context.

Project root and context

Always start the CLI from the repository root or a defined subpackage. Monorepos should narrow scope: "only touch packages/web" prevents stray edits in infrastructure folders. Add an AGENTS.md or rules file if your team documents boundaries (see our AGENTS.md guide).

Safe defaults

CLI on Windows specifically

Prefer PowerShell 7 over legacy cmd. WSL2 is fine, but keep files in the Linux filesystem when performance matters — editing through /mnt/c/ can be slow on large trees.

Compare workflows in Claude Code vs desktop if you are still deciding.

Ready to install Claude Code? Start on our download page, then use the official installer.

Open download page Official download