apps/docs/command-reference.mdx
# Limit the number of tasks generated
task-master parse-prd <prd-file.txt> --num-tasks=10
```
# List tasks with a specific status
task-master list --status=<status>
# List tasks with subtasks
task-master list --with-subtasks
# List tasks with a specific status and include subtasks
task-master list --status=<status> --with-subtasks
# Watch for changes and auto-refresh
task-master list --watch
task-master list -w
# Compact output format
task-master list --compact
task-master list -c
# Watch mode with compact output
task-master list -w -c
# Hide the header
task-master list --no-header
```
# View a specific subtask (e.g., subtask 2 of task 1)
task-master show 1.2
```
# Use research-backed updates with Perplexity AI
task-master update-task --id=<id> --prompt="<prompt>" --research
```
# Example: Add details about API rate limiting to subtask 2 of task 5
task-master update-subtask --id=5.2 --prompt="Add rate limiting of 100 requests per minute"
# Use research-backed updates with Perplexity AI
task-master update-subtask --id=<parentId.subtaskId> --prompt="<prompt>" --research
```
Unlike the `update-task` command which replaces task information, the `update-subtask` command _appends_ new information to the existing subtask details, marking it with a timestamp. This is useful for iteratively enhancing subtasks while preserving the original content.
# Set status for multiple tasks
task-master set-status --id=1,2,3 --status=<status>
# Set status for subtasks
task-master set-status --id=1.1,1.2 --status=<status>
```
When marking a task as "done", all of its subtasks will automatically be marked as "done" as well.
# Expand with additional context
task-master expand --id=<id> --prompt="<context>"
# Expand all pending tasks
task-master expand --all
# Force regeneration of subtasks for tasks that already have them
task-master expand --all --force
# Research-backed subtask generation for a specific task
task-master expand --id=<id> --research
# Research-backed generation for all tasks
task-master expand --all --research
```
# Clear subtasks from multiple tasks
task-master clear-subtasks --id=1,2,3
# Clear subtasks from all tasks
task-master clear-subtasks --all
```
# Save report to a custom location
task-master analyze-complexity --output=my-report.json
# Use a specific LLM model
task-master analyze-complexity --model=claude-3-opus-20240229
# Set a custom complexity threshold (1-10)
task-master analyze-complexity --threshold=6
# Use an alternative tasks file
task-master analyze-complexity --file=custom-tasks.json
# Use Perplexity AI for research-backed complexity analysis
task-master analyze-complexity --research
```
# View a report at a custom location
task-master complexity-report --file=my-report.json
```
# Remove a dependency from a task
task-master remove-dependency --id=<id> --depends-on=<id>
# Validate dependencies without fixing them
task-master validate-dependencies
# Find and fix invalid dependencies automatically
task-master fix-dependencies
```
# Add a task with dependencies
task-master add-task --prompt="Description" --dependencies=1,2,3
# Add a task with priority
task-master add-task --prompt="Description" --priority=high
```
# Get next action with context
task-master autopilot next
# Complete phase with test results
task-master autopilot complete --results '{"total":N,"passed":N,"failed":N}'
# Commit changes
task-master autopilot commit
# Check workflow status
task-master autopilot status
# Resume interrupted workflow
task-master autopilot resume
# Abort workflow
task-master autopilot abort
```
The TDD workflow enforces RED → GREEN → COMMIT cycles for each subtask. See [AI Agent Integration](/tdd-workflow/ai-agent-integration) for details.
# Use a specific preset
task-master loop -n 10 --prompt test-coverage
task-master loop -n 10 --prompt linting
task-master loop -n 10 --prompt duplication
task-master loop -n 10 --prompt entropy
# Use a custom prompt file
task-master loop -n 10 --prompt ./my-workflow.md
# Filter to tasks with a specific tag
task-master loop -n 10 --tag backend
# Custom progress file location
task-master loop -n 10 --progress-file ./my-progress.txt
# Output as JSON
task-master loop -n 10 --json
```
**Built-in presets:**
- `default` - Complete tasks from Task Master backlog one at a time
- `test-coverage` - Write meaningful tests for untested user-facing behavior
- `linting` - Fix lint and type errors incrementally
- `duplication` - Refactor duplicated code into shared utilities
- `entropy` - Clean up code smells (long functions, deep nesting, etc.)
Each iteration spawns a fresh Claude Code session, avoiding context fatigue. See [Loop Command](/capabilities/loop) for full documentation.