Skip to main content

禅道项目管理 CLI - 任务查询、创建、编辑、工时记录、6R报表,可集成 OpenClaw

Project description

zentao-cli

禅道项目管理 CLI 工具,支持任务查询、创建、编辑、工时记录和 6R 报表生成。

可独立使用,也可作为 OpenClaw Skill 集成到 AI agent 中。

安装

pip install zentao-cli

或通过 pipx / uvx 一次性运行:

uvx zentao-cli list --status done

配置

通过环境变量配置(必填):

export ZENTAO_HOST="https://zentao.example.com"
export ZENTAO_ACCOUNT="your_account"
export ZENTAO_PASSWORD="your_password"
export ZENTAO_DEFAULT_EXECUTION_NAME="运维"   # 默认执行名称

可选:

export ZENTAO_DEFAULT_ASSIGNEE=""       # 默认指派人,留空则同 ACCOUNT
export ZENTAO_DEFAULT_TASK_TYPE="devel" # 默认任务类型

使用

# 查询任务
zentao list
zentao list --status done
zentao list --start-date 2026-03-01 --end-date 2026-03-31
zentao list --json

# 任务详情
zentao get 123

# 创建任务(自动完成)
zentao create \
  --title "修复 Nginx 配置" \
  --description "生产环境配置错误" \
  --work-content "排查并修复 upstream 配置" \
  --acceptance-criteria "服务正常转发"

# 编辑任务
zentao edit 123 --status done
zentao edit 123 --title "新标题" --assigned-to someone

# 删除任务
zentao delete 123

# 记录工时
zentao effort 123 --hours 2 --work "排查并修复配置"

# 生成 6R 报表
zentao report --start-date 2026-03-01 --end-date 2026-03-15

OpenClaw 集成

安装 CLI 后,将 SKILL.md 复制到 OpenClaw skills 目录即可:

pip install zentao-cli
mkdir -p ~/.openclaw/skills/zentao-task-manager
cp SKILL.md ~/.openclaw/skills/zentao-task-manager/

~/.openclaw/openclaw.json 中配置环境变量:

{
  "skills": {
    "entries": {
      "zentao-task-manager": {
        "enabled": true,
        "env": {
          "ZENTAO_HOST": "https://zentao.example.com",
          "ZENTAO_ACCOUNT": "your_account",
          "ZENTAO_PASSWORD": "your_password",
          "ZENTAO_DEFAULT_EXECUTION_NAME": "运维"
        }
      }
    }
  }
}

重启 gateway 即可使用。

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zentao_cli-1.1.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zentao_cli-1.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file zentao_cli-1.1.0.tar.gz.

File metadata

  • Download URL: zentao_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for zentao_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2f469944b93f34e30805e11982972258a8dd2adc25fe6e48eb791f248e22ee51
MD5 7132b1a41697cdf1d9f7dd65846b33bc
BLAKE2b-256 f20003534e7be4f69ae4feb975d16eab31fa8049ac458158e595a65d842b840e

See more details on using hashes here.

File details

Details for the file zentao_cli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: zentao_cli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for zentao_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4be46981abc615d823e99074f0bb81b396f020ce42478da6062d7699adca38b
MD5 f2684a3e26f31d2656dff154a5f56623
BLAKE2b-256 e8974796c14c16f5bcd5b41c35b9f0b66ae1028fadfa2b009beb96a28779fbf5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page