Skip to content

Instantly share code, notes, and snippets.

@kwmiebach
Last active February 27, 2026 09:59
Show Gist options
  • Select an option

  • Save kwmiebach/5f1b6a40b3cdee87c10f7751ba060a84 to your computer and use it in GitHub Desktop.

Select an option

Save kwmiebach/5f1b6a40b3cdee87c10f7751ba060a84 to your computer and use it in GitHub Desktop.
3 Ways to Install & Run Claude Code CLI (latest, not stable)
#!/bin/bash
# Option 1: Global install via npm (deprecated, use native installer instead)
npm install -g @anthropic-ai/claude-code@latest
# In case of an error message 'not empty' just delete the first path in the message. Example:
rm -rf ~/.nvm/versions/node/v24.11.0/lib/node_modules/@anthropic-ai/claude-code
# Option 2: Run directly without install
npx @anthropic-ai/claude-code@latest
# Option 3: Native installer (recommended) — no Node.js required, auto-updates
curl -fsSL https://claude.ai/install.sh | bash -s latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment