--- title: Claude Code Setup sidebarTitle: "Claude Code" ---
Claude Code

Claude Code

Anthropic's official CLI for Claude

Claude Code offers the smoothest Task Master experience with **zero API key setup** and direct Claude integration. ## 🎯 Why Choose Claude Code?

🔓 No API Keys

Uses your existing Claude subscription - no separate API setup needed

⚡ Native Integration

Built specifically for Claude - seamless Task Master experience

## 📦 Installation ### Step 1: Install Claude Code Follow the [official Claude Code installation guide](https://docs.anthropic.com/en/docs/claude-code) or use our quick setup: ```bash # Install via Homebrew (recommended) brew install claude-code # Or download from GitHub releases curl -L https://github.com/anthropics/claude-code/releases/latest/download/claude-code-macos.tar.gz | tar xz sudo mv claude-code /usr/local/bin/ ``` ```powershell # Download and install from GitHub releases # Visit: https://github.com/anthropics/claude-code/releases/latest # Download: claude-code-windows.exe # Or use winget (if available) winget install Anthropic.ClaudeCode ``` ```bash # Download from GitHub releases curl -L https://github.com/anthropics/claude-code/releases/latest/download/claude-code-linux.tar.gz | tar xz sudo mv claude-code /usr/local/bin/ # Or install via package manager (if available) sudo apt install claude-code # Ubuntu/Debian sudo yum install claude-code # RHEL/CentOS ``` ### Step 2: Authenticate with Claude ```bash # Login to your Claude account claude auth login ``` Follow the prompts to authenticate with your Anthropic account. ## 🔧 Task Master Integration ### Method 1: MCP Integration (Recommended) Add Task Master to your Claude Code MCP configuration: ```bash # Add Task Master MCP server globally claude mcp add task-master-ai -s global -- npx -y task-master-ai ``` ```bash # Add for current project only claude mcp add task-master-ai -s project -- npx -y task-master-ai ``` ```bash # Windows-specific command claude mcp add task-master-mcp -s project -- cmd /c "npx -y --package=task-master-ai task-master-ai" ``` ### Method 2: Direct CLI Usage You can also use Task Master commands directly alongside Claude Code: ```bash # Initialize Task Master in your project npx task-master-ai init # Use Claude Code for AI interactions claude "Help me implement the next task" # Use Task Master for task management npx task-master-ai next npx task-master-ai show 1.2 ``` ## 🚀 Getting Started ### 1. Initialize Your Project In your project directory: ```bash # Start Claude Code claude # In the Claude Code chat, initialize Task Master Initialize taskmaster-ai in my project ``` ### 2. Configure Models (Optional) Since Claude Code doesn't need API keys, you can use it as your main model: ``` Change the main model to claude-code/sonnet ``` Available Claude Code models: - `claude-code/sonnet` - Claude 3.5 Sonnet (recommended) - `claude-code/opus` - Claude 3 Opus (for complex tasks) ### 3. Create Your First Tasks ``` Can you parse my PRD and create tasks for building a todo app? ``` ## 💡 Advanced Configuration ### Hybrid Setup Use Claude Code as your main model with other APIs for research: Create `.env` in your project: ```bash # Optional: Add research capabilities PERPLEXITY_API_KEY=your_perplexity_key_here OPENAI_API_KEY=your_openai_key_here ``` Then configure models: ``` Change the main model to claude-code/sonnet and research model to perplexity-llama-3.1-sonar-large-128k-online ``` ### Multi-Session Workflows Claude Code excels at parallel development: ```bash # Terminal 1: Main development cd my-project && claude # Terminal 2: Testing and validation cd my-project && claude # Terminal 3: Documentation cd my-project && claude ``` Each session maintains Task Master context while allowing focused work streams. ## 🔍 Troubleshooting - **Check installation**: Run `claude --version` to verify installation - **Update PATH**: Ensure Claude Code is in your system PATH - **Reinstall**: Try reinstalling Claude Code from scratch - **Permissions**: Check file permissions for the claude binary - **Re-login**: Run `claude auth logout` then `claude auth login` - **Check account**: Verify your Anthropic account is active - **Network issues**: Check if you're behind a proxy or firewall - **Clear cache**: Delete `~/.claude` directory and re-authenticate - **Check Node.js**: Ensure Node.js 16+ is installed - **Test manually**: Run `npx task-master-ai` to test the server - **Clear MCP cache**: Remove and re-add the MCP server - **Check permissions**: Ensure npm can install packages - **Verify MCP**: Run `claude mcp list` to see installed servers - **Re-add server**: Remove and re-add the task-master-ai MCP server - **Check initialization**: Ensure project is initialized with `Initialize taskmaster-ai` - **Review logs**: Check Claude Code logs for error messages ## 💡 Pro Tips **Use headless mode** for automation: `claude -p "What's the next task I should work on?"` gives quick answers without opening the full chat interface. **Create custom commands** using Claude Code's command system for repeated Task Master workflows like "complete task and get next". **Leverage context persistence** - Claude Code maintains conversation history, making it perfect for long-running development sessions. ## 🎯 Best Practices ### Development Workflow ```bash # Morning routine claude "Show me today's tasks and priorities" # During development claude "Help me implement task 2.1" claude "Update task 2.1 with implementation notes" # End of day claude "Mark completed tasks as done and show tomorrow's priorities" ``` ### Team Collaboration ```bash # Share task status claude "Generate a progress report for the team" # Review dependencies claude "Check which tasks are blocked and why" # Planning sessions claude "Analyze complexity of remaining tasks" ``` ---
🎉

You're all set with Claude Code!

Claude Code offers the most seamless Task Master experience. Ready to create your first project? Check out our PRD guide.