task-master-install

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Task Master Install

Task Master 安装指南

Overview

概述

Task-master is an AI-powered task management system for breaking down complex projects into manageable tasks and subtasks. It supports PRD parsing, complexity analysis, and specification-driven development workflows.
Task-Master是一款AI驱动的任务管理系统,可将复杂项目拆解为易于管理的任务与子任务。它支持PRD解析、复杂度分析以及规范驱动开发工作流。

Installation

安装步骤

Step 1: Check if already installed

步骤1:检查是否已安装

bash
task-master --version
If task-master is already installed and the project has a
.taskmaster/
folder, you are finished.
bash
task-master --version
如果Task-Master已安装,且项目中存在
.taskmaster/
文件夹,则安装完成。

Step 2: If you need to install Task-Master

步骤2:若需安装Task-Master

Global installation (recommended):
bash
npm install -g task-master-ai
Local/npx alternative:
bash
npx task-master-ai init
全局安装(推荐):
bash
npm install -g task-master-ai
本地/npx替代方案:
bash
npx task-master-ai init

Step 3: If you don't have a
.taskmaster/
folder in your project

步骤3:若项目中无
.taskmaster/
文件夹

bash
task-master init
Common flags:
  • --name <name>
    - Set project name
  • --description <text>
    - Set project description
  • --version <version>
    - Set initial version (e.g., '0.1.0')
  • --rules <profiles>
    - Specify rule profiles (e.g.,
    cursor,windsurf
    )
  • -y, --yes
    - Skip prompts, use defaults
Example:
bash
task-master init --name "My Project" --description "AI-powered web app" --version "0.1.0" --rules cursor,windsurf --yes
bash
task-master init
常用参数:
  • --name <name>
    - 设置项目名称
  • --description <text>
    - 设置项目描述
  • --version <version>
    - 设置初始版本(例如:'0.1.0')
  • --rules <profiles>
    - 指定规则配置文件(例如:
    cursor,windsurf
  • -y, --yes
    - 跳过提示,使用默认配置
示例:
bash
task-master init --name "My Project" --description "AI-powered web app" --version "0.1.0" --rules cursor,windsurf --yes

What Happens During Init

初始化过程说明

Task-master init automatically creates:
  • .taskmaster/
    directory structure (config, tasks, docs, reports, templates)
  • Rule files for AI coding assistants (
    .cursor/rules/
    , etc.)
  • Configures AI provider and models to use: Cortex-Code, Claude-Code, Gemini-CLI, Codex-CLI, API, etc.
The bootstrapped rules guide all future task-master workflows - no additional setup needed.
Task-Master初始化会自动创建:
  • .taskmaster/
    目录结构(包含配置、任务、文档、报告、模板)
  • AI代码助手的规则文件(
    .cursor/rules/
    等)
  • 配置要使用的AI提供商与模型:Cortex-Code、Claude-Code、Gemini-CLI、Codex-CLI、API等
初始化生成的规则将指导所有后续Task-Master工作流 - 无需额外设置。

Installing MCP Server for AI Agents

为AI Agents安装MCP Server

To enable AI agents to interact with task-master through MCP tools:
Option 1: Using Cortex (Recommended)
bash
undefined
要让AI Agents通过MCP工具与Task-Master交互:
选项1:使用Cortex(推荐)
bash
undefined

Using npx (no global install required)

使用npx(无需全局安装)

cortex mcp add --args '-y, task-master-ai, mcp' taskmaster npx snova mcp add --args "run, -i, --rm, -e, DOCUMENT_URL, -e, DOCUMENT_TOKEN, -e, DOCUMENT_ID, -e, RUNTIME_URL, -e, RUNTIME_TOKEN, -e, ALLOW_IMG_OUTPUT, datalayer/jupyter-mcp-server:latest" --env "DOCUMENT_URL=http://host.docker.internal:8888, DOCUMENT_TOKEN=jupyter_mcp_token, DOCUMENT_ID=notebooks/model_training.ipynb, RUNTIME_URL=http://host.docker.internal:8888, RUNTIME_TOKEN=jupyter_mcp_token, ALLOW_IMG_OUTPUT=true" jupyter-mcp-server docker
cortex mcp add --args '-y, task-master-ai, mcp' taskmaster npx snova mcp add --args "run, -i, --rm, -e, DOCUMENT_URL, -e, DOCUMENT_TOKEN, -e, DOCUMENT_ID, -e, RUNTIME_URL, -e, RUNTIME_TOKEN, -e, ALLOW_IMG_OUTPUT, datalayer/jupyter-mcp-server:latest" --env "DOCUMENT_URL=http://host.docker.internal:8888, DOCUMENT_TOKEN=jupyter_mcp_token, DOCUMENT_ID=notebooks/model_training.ipynb, RUNTIME_URL=http://host.docker.internal:8888, RUNTIME_TOKEN=jupyter_mcp_token, ALLOW_IMG_OUTPUT=true" jupyter-mcp-server docker

Or if task-master is installed globally

若已全局安装Task-Master

cortex mcp add taskmaster task-master --args "mcp"

**Option 2: Manual Configuration**

Add to your MCP configuration (e.g., `.cursor/mcp.json` or `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "taskmaster": {
      "command": "npx",
      "args": ["-y", "task-master-ai", "mcp"]
    }
  }
}
Or if task-master is installed globally:
json
{
  "mcpServers": {
    "taskmaster": {
      "command": "task-master",
      "args": ["mcp"]
    }
  }
}
After configuration, restart your AI agent to connect to the task-master MCP server.
cortex mcp add taskmaster task-master --args "mcp"

**选项2:手动配置**

将以下内容添加到你的MCP配置文件(例如:`.cursor/mcp.json`或`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "taskmaster": {
      "command": "npx",
      "args": ["-y", "task-master-ai", "mcp"]
    }
  }
}
若已全局安装Task-Master:
json
{
  "mcpServers": {
    "taskmaster": {
      "command": "task-master",
      "args": ["mcp"]
    }
  }
}
配置完成后,重启你的AI Agent以连接到Task-Master MCP服务器。

Troubleshooting

故障排除

Node.js not found - Install Node.js v16+ using:
  • Windows (with admin):
    winget install OpenJS.NodeJS
  • macOS:
    brew install node
  • Linux:
    sudo apt install nodejs npm
    (Debian/Ubuntu) or
    sudo yum install nodejs
    (RHEL/CentOS)
  • Download installer: nodejs.org
Installation issues - Uninstall and reinstall globally:
bash
npm uninstall -g task-master-ai
npm install -g task-master-ai
Then restart terminal and verify with
task-master --version
Permission errors:
  • Unix/macOS: Install via nvm using
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
    , restart terminal, and run
    nvm install 24
  • Windows without admin: Use Node.js installer's "Install for me only" option
未找到Node.js - 安装Node.js v16+,可通过以下方式:
  • Windows(需管理员权限):
    winget install OpenJS.NodeJS
  • macOS:
    brew install node
  • Linux:
    sudo apt install nodejs npm
    (Debian/Ubuntu)或
    sudo yum install nodejs
    (RHEL/CentOS)
  • 下载安装包:nodejs.org
安装问题 - 卸载并重新全局安装:
bash
npm uninstall -g task-master-ai
npm install -g task-master-ai
然后重启终端,使用
task-master --version
验证安装。
权限错误:
  • Unix/macOS:通过nvm安装,执行
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
    ,重启终端后运行
    nvm install 24
  • Windows无管理员权限:使用Node.js安装程序的“仅为我安装”选项