Claude Code is an agentic coding tool made by Anthropic that lives in your terminal. It can understand your codebase, make edits across multiple files, run commands, and help you work faster as a developer. Think of it as a senior developer pair-programmer that never gets tired.
Install Claude Code globally using npm:
npm install -g @anthropic-ai/claude-code
Verify the installation:
claude --version
Navigate to any project directory and launch Claude Code:
cd my-project claude
On first launch, Claude Code will:
Option 1: Anthropic API Key
Set your API key as an environment variable:
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
Option 2: Claude Pro/Max Subscription
If you have a Claude Pro or Max subscription, Claude Code will open a browser window for OAuth authentication. This is the easiest option if you already have a subscription.
Claude Code stores its configuration in ~/.claude/. Key settings can be configured via:
# View current settings claude config list # Set a configuration value claude config set theme dark
Let’s verify everything works. In your project directory, run:
claude "What files are in this directory?"
Claude Code should list the files in your current directory, confirming it can read your filesystem and respond to queries.
You now have Claude Code installed and configured. In the next tutorial, we’ll learn how to have effective conversations with Claude Code to get the most out of it.