关于 zentao
zentao 是通过 CLI 操作禅道的技能,已弃用,但现有用户仍可使用。它涵盖项目和产品工作,以及缺陷、任务、需求、测试、文档、用户、问题与风险;README 建议改用仍在维护的 zentao-cli。
主要功能
- 01列出并管理缺陷、任务、需求和待办
- 02查询产品、项目集、项目和执行
- 03访问计划、发布、构建和测试记录
- 04浏览用户、部门和文档
- 05将命令结果导出为 JSON
适用场景
- 01查看和更新禅道缺陷或任务记录
- 02检查项目、产品和发布状态
- 03检索测试用例、文档或风险记录
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ leeguooooo/ zentao-mcp --skill zentao安装后在 Claude Code 中输入/zentao确认已加载。
详细介绍
zentao(ZenTao CLI)
⚠️ 已弃用。 建议使用官方维护的
zentao-cli及其技能easysoft/zentao-skills(REST v2、内置 MCP 服务、模块覆盖更全面)。使用以下命令迁移:npx skills add easysoft/zentao-skills。此技能仍可供现有用户使用。
何时使用此技能
当用户询问任何与禅道 / ZenTao 相关的内容时,使用此技能,包括:
- Bug:列表、我的 Bug、统计、获取、创建、解决、指派、评论、关闭、激活
- 任务:列表、获取、创建、开始、完成、暂停、关闭
- 需求:列表、获取、创建
- 待办:列表、获取、创建、完成、关闭
- 产品、项目集、项目、执行
- 计划、发布、构建
- 测试用例、测试单、测试套件
- 文档和文档库
- 用户和部门
- 问题和风险
- 登录、whoami、自测、JSON 导出
用户常见的请求包括:
- “帮我查禅道 bug / task / story / todo”
- “统计一下 bug 解决率” / “看看各产品的 bug 解决情况”
- “看一下产品、项目、执行、版本、计划、构建”
- “查测试单、测试用例、测试套件”
- “看文档库 / 文档 / 部门 / 用户”
- “查问题 / 风险”
- “帮我登录禅道” / “验证禅道连接”
安装
npx skills add leeguooooo/zentao-mcp -y -g
pnpm i -g @leeguoo/zentao-mcp
备用方案:
npm i -g @leeguoo/zentao-mcp
npx -y @leeguoo/zentao-mcp --help
skills add 会安装技能定义;正常使用时,CLI 仍需作为 zentao 命令位于 PATH 中。
登录
zentao login --zentao-url="https://zentao.example.com/zentao" --zentao-account="leo" --zentao-password="***"
zentao whoami
重要:--zentao-url 通常必须包含 /zentao。
快速开始
zentao login --zentao-url="https://zentao.example.com/zentao" --zentao-account="leo" --zentao-password="***"
zentao whoami
zentao self-test
功能一览
查询单条记录或执行更改状态的操作时,使用单数命令;查询列表时,使用复数命令。
zentao login
zentao whoami
zentao self-test
zentao products list
zentao programs list
zentao projects list
zentao projects builds --id 22
zentao executions list
zentao bugs list --product 6
zentao bugs mine --status active --include-details
zentao bugs stats --product-ids 1,2 --group-by product|person [--from DATE] [--to DATE]
zentao bug get|create|resolve|assign|comment|close|activate ...
zentao tasks list --execution 25
zentao task get|create|start|finish|pause|close ...
zentao stories list --product 3
zentao story get|create ...
zentao todos list|get|create|finish|close ...
zentao plans list|get ...
zentao releases list|get ...
zentao testcases list|get ...
zentao testtasks list|get ...
zentao testsuites list|get ...
zentao docs libs|list|get ...
zentao users list
zentao departments list
zentao issues list|get ...
zentao risks list|get ...
身份验证和输出规则
- 所有命令都可以读取已保存登录配置中的凭据。
- 也可以使用标志:
--zentao-url、--zentao-account、--zentao-password - 也可以使用环境变量:
ZENTAO_URL、ZENTAO_ACCOUNT、ZENTAO_PASSWORD - 调用方需要原始机器可读输出时,添加
--json。 - ZenTao URL 通常需要带
/zentao后缀。
Bug 命令
zentao bugs list --product 6
zentao bugs mine --scope assigned --status active --include-details
zentao bug get --id 1329
zentao bug create --product 6 --title "bug title" [--severity 3] [--pri 2] [--type codeerror] [--steps "..."] [--assigned-to account] [--opened-build trunk]
zentao bug resolve --id 1329 --resolution fixed [--resolved-build trunk] [--assigned-to kelly] [--comment "..."]
zentao bug assign --id 1329 --assigned-to rd-yitong [--comment "..."]
zentao bug close --id 1329 [--comment "..."]
zentao bug activate --id 1329 [--assigned-to account] [--comment "..."]
zentao bug comment --id 1329 --comment "已确认,等待修复"
解决方案值:fixed、bydesign、duplicate、postponed、notrepro、willnotfix、tostory、external
Bug 统计
# 按产品统计解决率
zentao bugs stats --product-ids 1,2 --group-by product
# 按人员统计解决率(按实际解决人 resolvedBy 分组)
zentao bugs stats --product-ids 1,2 --group-by person
# 按产品统计指定时间段内的解决数量
zentao bugs stats --product-ids 1,2 --group-by product --from 2026-01-01 --to 2026-04-09
# 按人员统计指定时间段内的解决数量
zentao bugs stats --product-ids 1,2 --group-by person --from 2026-03-01 --to 2026-03-31
# JSON 输出
zentao bugs stats --product-ids 1,2 --group-by product --json
--product-ids必填,多个 ID 以逗号分隔--group-by支持product或person,默认为product- 未指定
--from/--to时输出解决率;指定时间段时输出该期间的解决数量 - 人员维度按
resolvedBy(实际解决人)分组
任务命令
zentao tasks list --execution 25
zentao task get --id 388
zentao task create --execution 25 --name "task name" [--assigned-to account] [--pri 3] [--estimate 8] [--type devel] [--desc "..."]
zentao task start --id 388 [--consumed 2] [--left 6]
zentao task finish --id 388 [--finished-date "2026-04-08"] [--consumed 8]
zentao task pause --id 388
zentao task close --id 388 [--comment "done"]
需求命令
zentao stories list --product 3
zentao story get --id 1
zentao story create --product 3 --title "story title" [--spec "description"] [--pri 2] [--estimate 3] [--type story] [--assigned-to account]
待办命令
zentao todos list
zentao todos get --id 1
zentao todos create --name "todo name" [--type custom] [--date 2026-04-08] [--begin 09:00] [--end 10:00] [--pri 3] [--desc "..."] [--assigned-to account]
zentao todos finish --id 1
zentao todos close --id 1
产品、项目集、项目和执行命令
zentao products list
zentao programs list
zentao projects list
zentao projects builds --id 22
zentao executions list
产品计划和发布
zentao plans list --product 3
zentao plans get --id 1
zentao releases list --product 3
zentao releases get --id 1
测试命令
zentao testcases list --product 3
zentao testcases get --id 1
zentao testtasks list
zentao testtasks get --id 1
zentao testsuites list --product 3
zentao testsuites get --id 1
组织与文档
zentao users list
zentao departments list
zentao docs libs
zentao docs list --lib 50
zentao docs get --id 1
问题与风险
zentao issues list
zentao issues get --id 1
zentao risks list
zentao risks get --id 1
JSON 输出
所有命令都支持使用 --json 输出完整 JSON 载荷:
zentao whoami --json
zentao bugs list --product 6 --json
zentao task get --id 388 --json
zentao users list --json
zentao issues get --id 1 --json
建议的执行流程
在帮助用户执行操作时,建议按以下顺序进行:
- 确认 CLI 可用:
zentao --help - 确认身份验证有效:
zentao whoami - 如果身份验证可能失效,运行:
zentao self-test - 使用能够满足请求的最精简命令。
- 调用方需要结构化输出以便后续自动化时,添加
--json。
评论
支持 Markdown