复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-claude-task-master-8cb4e6881273 ,按照其中的说明把「install-taskmaster」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Check if Task Master is installed and install it if needed.
This command helps you get Task Master set up globally on your system.
Check Current Installation
# Check if task-master command exists
which task-master || echo "Task Master not found"
# Check npm global packages
npm list -g task-master-ai
System Requirements Check
# Verify Node.js is installed
node --version
# Verify npm is installed
npm --version
# Check Node version (need 16+)
Install Task Master Globally If not installed, run:
npm install -g task-master-ai
Verify Installation
# Check version
task-master --version
# Verify command is available
which task-master
Initial Setup
# Initialize in current directory
task-master init
Configure AI Provider Ensure you have at least one AI provider API key set:
# Check current configuration
task-master models --status
# If no API keys found, guide setup
echo "You'll need at least one API key:"
echo "- ANTHROPIC_API_KEY for Claude"
echo "- OPENAI_API_KEY for GPT models"
echo "- PERPLEXITY_API_KEY for research"
echo ""
echo "Set them in your shell profile or .env file"
Quick Test
# Create a test PRD
echo "Build a simple hello world API" > test-prd.txt
# Try parsing it
task-master parse-prd test-prd.txt -n 3
If installation fails:
Permission Errors:
# Try with sudo (macOS/Linux)
sudo npm install -g task-master-ai
# Or fix npm permissions
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
Network Issues:
# Use different registry
npm install -g task-master-ai --registry https://registry.npmjs.org/
Node Version Issues:
# Install Node 20+ via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20
Once installed, you should see:
✅ Task Master v0.16.2 (or higher) installed
✅ Command 'task-master' available globally
✅ AI provider configured
✅ Ready to use slash commands!
Try: /project:task-master:init your-prd.md
After installation:
/project:utils:check-health to verify setup/project:task-master:models