Claude Code Tutorial: Setup, Commands, and Pricing
A practical setup and usage guide for Claude Code covering native terminal installation, subscription tiers, and current Claude 5.5 and 5.2 API token pricing.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and handles routine tasks, code explanation, and git workflows through natural language commands. Access is included with paid Claude Pro ($20 per month, or $17 per month billed annually at $200 up front), Max ($100 per month), and Ultra ($200 per month) subscriptions, and you should install it using native shell scripts or package managers rather than the deprecated npm package.12
Installing Claude Code without deprecated npm
Anthropic has deprecated the older npm installation method (npm install -g @anthropic-ai/claude-code) and recommends native installers or OS package managers instead. For macOS/Linux, install using curl (`curl -fsSL https://claude.ai/install.sh | bash`) or Homebrew (`brew install --cask claude-code`). For Windows, use PowerShell (`irm https://claude.ai/install.ps1 | iex`) or WinGet (`winget install Anthropic.ClaudeCode`).1
Starting a session in your project directory
Once installation finishes, open your terminal, navigate to the root folder of your project, and run the command claude. From there, you can issue natural language requests to explain unfamiliar files, execute routine edits, or manage git workflows without switching to a separate web interface. If you are weighing terminal agents against other coding assistants, see our Claude Code vs Codex comparison.1
Before your first prompt, run claude auth login to sign in with your Anthropic account, or add the --console flag to bill through the Anthropic Console instead of a Claude subscription. Inside a repository, run /init to generate a starter CLAUDE.md file, use /plan before a large change, and adjust your model or reasoning level with /model and /effort.67
Model costs for API and subscription sessions
Pro ($20/month), Max ($100/month), and Ultra ($200/month) plans include Claude Code access, whereas teams using --console for API billing pay per million tokens, such as $2 input and $10 output on Claude Sonnet 5.5 (or see Claude Opus 5.5 vs Sonnet 5.5 for higher-tier rates). For coding assistants that keep a summarized codebase in the prompt, prompt caching also reduces costs and latency using a 5-minute default cache lifetime.23457
Privacy, feedback, and the /bug command
When you use Claude Code, Anthropic collects feedback including usage data such as code acceptances or rejections, along with associated conversation data. Anthropic enforces limited retention periods for sensitive information, restricts access to user session data, and maintains clear policies against using Claude Code feedback for model training. If you hit an error, type /bug inside the terminal interface to report it directly, or file a GitHub issue.1