Global CLI Commands
task-master
commandscripts/dev.js
is available through this interfacenpm install -g claude-task-master
or use locally via npx
task-master <command>
instead of node scripts/dev.js <command>
task-master list
instead of node scripts/dev.js list
task-master next
instead of node scripts/dev.js next
task-master expand --id=3
instead of node scripts/dev.js expand --id=3
task-master init
for project setupDevelopment Workflow Process
task-master init
or node scripts/dev.js parse-prd --input=<prd-file.txt>
to generate initial tasks.jsontask-master list
to see current tasks, status, and IDstask-master analyze-complexity --research
before breaking down taskstask-master show <id>
to understand implementation requirementstask-master expand --id=<id>
with appropriate flagstask-master clear-subtasks --id=<id>
before regeneratingtask-master set-status --id=<id> --status=done
task-master generate
after updating tasks.jsontask-master fix-dependencies
when neededTask Complexity Analysis
node scripts/dev.js analyze-complexity --research
for comprehensive analysisnode scripts/dev.js complexity-report
for a formatted, readable version of the reportTask Breakdown Process
node scripts/dev.js expand --id=<id>
node scripts/dev.js expand --id=<id> --subtasks=<number>
--research
flag to leverage Perplexity AI for research-backed expansion--prompt="<context>"
to provide additional context when needed--all
flag to expand multiple pending tasks at onceclear-subtasks
commandImplementation Drift Handling
node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"
to update tasks.jsonTask Status Management
Task File Format Reference
# Task ID: <id>
# Title: <title>
# Status: <status>
# Dependencies: <comma-separated list of dependency IDs>
# Priority: <priority>
# Description: <brief description>
# Details:
<detailed implementation notes>
# Test Strategy:
<verification approach>
Command Reference: parse-prd
node scripts/dev.js parse-prd --input=<prd-file.txt>
task-master parse-prd --input=<prd-file.txt>
--input=<file>
: Path to the PRD text file (default: sample-prd.txt)task-master parse-prd --input=requirements.txt
Command Reference: update
node scripts/dev.js update --from=<id> --prompt="<prompt>"
task-master update --from=<id> --prompt="<prompt>"
--from=<id>
: Task ID from which to start updating (required)--prompt="<text>"
: Explanation of changes or new context (required)task-master update --from=4 --prompt="Now we are using Express instead of Fastify."
Command Reference: generate
node scripts/dev.js generate
task-master generate
--file=<path>, -f
: Use alternative tasks.json file (default: 'tasks/tasks.json')--output=<dir>, -o
: Output directory (default: 'tasks')task-master generate
Command Reference: set-status
node scripts/dev.js set-status --id=<id> --status=<status>
task-master set-status --id=<id> --status=<status>
--id=<id>
: ID of the task to update (required)--status=<status>
: New status value (required)task-master set-status --id=3 --status=done
Command Reference: list
node scripts/dev.js list
task-master list
--status=<status>, -s
: Filter by status--with-subtasks
: Show subtasks for each task--file=<path>, -f
: Use alternative tasks.json file (default: 'tasks/tasks.json')task-master list
Command Reference: expand
node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]
task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]
--id=<id>
: ID of task to expand (required unless using --all)--all
: Expand all pending tasks, prioritized by complexity--num=<number>
: Number of subtasks to generate (default: from complexity report)--research
: Use Perplexity AI for research-backed generation--prompt="<text>"
: Additional context for subtask generation--force
: Regenerate subtasks even for tasks that already have themtask-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"
Command Reference: analyze-complexity
node scripts/dev.js analyze-complexity [options]
task-master analyze-complexity [options]
--output=<file>, -o
: Output file path (default: scripts/task-complexity-report.json)--model=<model>, -m
: Override LLM model to use--threshold=<number>, -t
: Minimum score for expansion recommendation (default: 5)--file=<path>, -f
: Use alternative tasks.json file--research, -r
: Use Perplexity AI for research-backed analysistask-master analyze-complexity --research
Command Reference: clear-subtasks
node scripts/dev.js clear-subtasks --id=<id>
task-master clear-subtasks --id=<id>
--id=<id>
: ID or comma-separated IDs of tasks to clear subtasks from--all
: Clear subtasks from all taskstask-master clear-subtasks --id=3
task-master clear-subtasks --id=1,2,3
task-master clear-subtasks --all
Task Structure Fields
1
)"Initialize Repo"
)"Create a new repository, set up initial structure."
)"pending"
, "done"
, "deferred"
)[1, 2]
)
"high"
, "medium"
, "low"
)"Use GitHub client ID/secret, handle callback, set session token."
)"Deploy and call endpoint to confirm 'Hello World' response."
)[{"id": 1, "title": "Configure OAuth", ...}]
)Environment Variables Configuration
ANTHROPIC_API_KEY=sk-ant-api03-...
)"claude-3-7-sonnet-20250219"
): Claude model to use (Example: MODEL=claude-3-opus-20240229
)"4000"
): Maximum tokens for responses (Example: MAX_TOKENS=8000
)"0.7"
): Temperature for model responses (Example: TEMPERATURE=0.5
)"false"
): Enable debug logging (Example: DEBUG=true
)"info"
): Console output level (Example: TASKMASTER_LOG_LEVEL=debug
)"3"
): Default subtask count (Example: DEFAULT_SUBTASKS=5
)"medium"
): Default priority (Example: DEFAULT_PRIORITY=high
)"MCP SaaS MVP"
): Project name in metadata (Example: PROJECT_NAME=My Awesome Project
)"1.0.0"
): Version in metadata (Example: PROJECT_VERSION=2.1.0
)PERPLEXITY_API_KEY=pplx-...
)"sonar-medium-online"
): Perplexity model (Example: PERPLEXITY_MODEL=sonar-large-online
)Determining the Next Task
task-master next
to show the next task to work onViewing Specific Task Details
task-master show <id>
or task-master show --id=<id>
to view a specific tasktask-master show 1.2
(shows subtask 2 of task 1)Managing Task Dependencies
task-master add-dependency --id=<id> --depends-on=<id>
to add a dependencytask-master remove-dependency --id=<id> --depends-on=<id>
to remove a dependencyCommand Reference: add-dependency
node scripts/dev.js add-dependency --id=<id> --depends-on=<id>
task-master add-dependency --id=<id> --depends-on=<id>
--id=<id>
: ID of task that will depend on another task (required)--depends-on=<id>
: ID of task that will become a dependency (required)task-master add-dependency --id=22 --depends-on=21
Command Reference: remove-dependency
node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>
task-master remove-dependency --id=<id> --depends-on=<id>
--id=<id>
: ID of task to remove dependency from (required)--depends-on=<id>
: ID of task to remove as a dependency (required)task-master remove-dependency --id=22 --depends-on=21
Command Reference: validate-dependencies
node scripts/dev.js validate-dependencies [options]
task-master validate-dependencies [options]
--file=<path>, -f
: Use alternative tasks.json file (default: 'tasks/tasks.json')task-master validate-dependencies
Command Reference: fix-dependencies
node scripts/dev.js fix-dependencies [options]
task-master fix-dependencies [options]
--file=<path>, -f
: Use alternative tasks.json file (default: 'tasks/tasks.json')task-master fix-dependencies
Command Reference: complexity-report
node scripts/dev.js complexity-report [options]
task-master complexity-report [options]
--file=<path>, -f
: Path to the complexity report file (default: 'scripts/task-complexity-report.json')task-master complexity-report
Command Reference: add-task
task-master add-task [options]
--file=<path>, -f
: Path to the tasks file (default: 'tasks/tasks.json')--prompt=<text>, -p
: Description of the task to add (required)--dependencies=<ids>, -d
: Comma-separated list of task IDs this task depends on--priority=<priority>
: Task priority (high, medium, low) (default: 'medium')task-master add-task --prompt="Create user authentication using Auth0"
Command Reference: init
task-master init
task-master init
Code Analysis & Refactoring Techniques
grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./
scripts/dev.js
to modular structure: grep -E "function \w+\(" scripts/dev.js
grep -E "export (function|const)" scripts/modules/
grep -E "function (get|set|create|update)\w+\(" -r ./
-n
flag to include line numbers--include="*.ts"
to filter by file extension| sort
to alphabetize results