This document explains how to use Task Master with your local Claude Code CLI instead of requiring a separate Claude API key.
Task Master has been modified to work with the locally installed Claude Code CLI, allowing you to utilize your existing Claude Code installation without requiring a separate Anthropic API key.
-
Ensure you have Claude Code CLI installed and working properly
- You should be able to run
claude-code --versionsuccessfully - If not, install Claude Code following the official instructions
- You should be able to run
-
Task Master with Claude Code integration
- This version of Task Master includes the necessary modifications
The default configuration is set to use Claude Code automatically. If you want to verify or change your configuration:
# Check current configuration
task-master models
# Set Claude Code as the main provider (if not already set)
task-master models --set-main=local --claude-codeWhen Task Master is configured to use Claude Code:
- Instead of making API calls to Anthropic's servers, Task Master will execute commands using your local Claude Code CLI
- No API key is required as it leverages your local Claude Code authentication
- Prompts are passed to Claude Code via temporary files
- Results are processed and returned to Task Master
You can test if the Claude Code integration is working properly by running:
node test-claude-code.jsThis will send a simple test prompt to Claude Code and display the result.
- No need for a separate Anthropic API key
- No additional billing for Claude API usage
- Leverages your existing Claude Code installation
- All Task Master functionality works with Claude Code
- The streaming functionality is not fully implemented for Claude Code (responses are returned all at once)
- Complex tool use might have limitations compared to direct API calls
- Depends on the Claude Code CLI being installed and correctly configured
If you encounter issues:
-
Verify Claude Code is working by testing it directly:
claude-code prompt "What is 2+2?" -
Check the Claude Code path in the integration:
- The implementation looks for Claude Code in common installation locations
- If your installation is in a non-standard location, you may need to modify the path in
/src/ai-providers/claude-code.js
-
Try switching to Anthropic API temporarily to compare behavior:
task-master models --set-main=claude-3-7-sonnet-20250219 --anthropic(Note: This will require a valid ANTHROPIC_API_KEY in your environment)