Files
claude-task-master/apps/docs/configuration.mdx
github-actions[bot] c3af781558 docs: auto-update documentation based on changes in next branch
This PR was automatically generated to update documentation based on recent changes.

  Original commit: chore: improve changeset\n\n

  Co-authored-by: Claude <claude-assistant@anthropic.com>
2025-11-14 20:30:27 +00:00

150 lines
4.2 KiB
Plaintext

---
title: "Configuration"
description: "Configure Task Master through environment variables in a .env file"
---
## Required Configuration
<Note>
Task Master requires an Anthropic API key to function. Add this to your `.env` file:
```bash
ANTHROPIC_API_KEY=sk-ant-api03-your-api-key
```
You can obtain an API key from the [Anthropic Console](https://console.anthropic.com/).
</Note>
## Optional Configuration
| Variable | Default Value | Description | Example |
| --- | --- | --- | --- |
| `MODEL` | `"claude-3-7-sonnet-20250219"` | Claude model to use | `MODEL=claude-3-opus-20240229` |
| `MAX_TOKENS` | `"4000"` | Maximum tokens for responses | `MAX_TOKENS=8000` |
| `TEMPERATURE` | `"0.7"` | Temperature for model responses | `TEMPERATURE=0.5` |
| `DEBUG` | `"false"` | Enable debug logging | `DEBUG=true` |
| `LOG_LEVEL` | `"info"` | Console output level | `LOG_LEVEL=debug` |
| `DEFAULT_SUBTASKS` | `"3"` | Default subtask count | `DEFAULT_SUBTASKS=5` |
| `DEFAULT_PRIORITY` | `"medium"` | Default priority | `DEFAULT_PRIORITY=high` |
| `PROJECT_NAME` | `"MCP SaaS MVP"` | Project name in metadata | `PROJECT_NAME=My Awesome Project` |
| `PROJECT_VERSION` | `"1.0.0"` | Version in metadata | `PROJECT_VERSION=2.1.0` |
| `PERPLEXITY_API_KEY` | - | For research-backed features | `PERPLEXITY_API_KEY=pplx-...` |
| `PERPLEXITY_MODEL` | `"sonar-medium-online"` | Perplexity model | `PERPLEXITY_MODEL=sonar-large-online` |
| `TASKMASTER_ENABLE_PROXY` | `"false"` | Enable proxy support for AI providers | `TASKMASTER_ENABLE_PROXY=true` |
## TDD Workflow Configuration
Additional options for autonomous TDD workflow:
| Variable | Default | Description |
| --- | --- | --- |
| `TM_MAX_ATTEMPTS` | `3` | Max attempts per subtask before marking blocked |
| `TM_AUTO_COMMIT` | `true` | Auto-commit after GREEN phase |
| `TM_PROJECT_ROOT` | Current dir | Default project root |
## Example .env File
```
# Required
ANTHROPIC_API_KEY=sk-ant-api03-your-api-key
# Optional - Claude Configuration
MODEL=claude-3-7-sonnet-20250219
MAX_TOKENS=4000
TEMPERATURE=0.7
# Optional - Perplexity API for Research
PERPLEXITY_API_KEY=pplx-your-api-key
PERPLEXITY_MODEL=sonar-medium-online
# Optional - Project Info
PROJECT_NAME=My Project
PROJECT_VERSION=1.0.0
# Optional - Application Configuration
DEFAULT_SUBTASKS=3
DEFAULT_PRIORITY=medium
DEBUG=false
LOG_LEVEL=info
# TDD Workflow
TM_MAX_ATTEMPTS=3
TM_AUTO_COMMIT=true
# Proxy Support (Optional)
# TASKMASTER_ENABLE_PROXY=true
# http_proxy=http://your-proxy:port
# https_proxy=http://your-proxy:port
# no_proxy=localhost,127.0.0.1
```
## Proxy Configuration
<Note>
Task Master supports HTTP/HTTPS proxy configuration for corporate or restricted network environments where AI provider APIs are accessed through proxies.
</Note>
Proxy support is **opt-in** and can be enabled using either method:
### Method 1: Environment Variable
```bash
export TASKMASTER_ENABLE_PROXY=true
export http_proxy=http://your-proxy:port
export https_proxy=http://your-proxy:port
export no_proxy=localhost,127.0.0.1 # Optional: bypass proxy for specific hosts
# Then use Task Master normally
task-master add-task "Create a new feature"
```
### Method 2: Configuration File
Add to `.taskmaster/config.json`:
```json
{
"global": {
"enableProxy": true
}
}
```
Then set your proxy environment variables:
```bash
export http_proxy=http://your-proxy:port
export https_proxy=http://your-proxy:port
```
<Note>
Priority: `TASKMASTER_ENABLE_PROXY` environment variable overrides the `config.json` setting.
</Note>
**Supported scenarios:**
- Corporate firewalls requiring HTTP/HTTPS proxy
- Network environments with restricted internet access
- All AI providers: OpenAI, Anthropic, Perplexity, Azure OpenAI, Google AI, Google Vertex AI, AWS Bedrock, and OpenAI-compatible providers
## Troubleshooting
### If `task-master init` doesn't respond:
Try running it with Node directly:
```bash
node node_modules/claude-task-master/scripts/init.js
```
Or clone the repository and run:
```bash
git clone https://github.com/eyaltoledano/claude-task-master.git
cd claude-task-master
node scripts/init.js
```
<Note>
For advanced configuration options and detailed customization, see our [Advanced Configuration Guide] page.
</Note>