The whole dev loop.
None of the guesswork.
zentao-cli-go drives Zentao from your shell — stories, tasks, bugs and first-class comments — and ships a contract test suite that pins what the server actually does, not what the upstream OpenAPI spec claims. When behavior drifts, the failing test names it.
Why zentao-cli-go
The spec is a hypothesis.
The contract tests are the truth.
The upstream OpenAPI spec does not match real server behavior — so this CLI owns its schema layer and verifies every claim against a live Zentao.
Comments are first-class
Comments have no REST endpoint at all — they live in the classic action module behind
web-session auth. The CLI handles that so comment add/list works on any
object type, from stories to testcases.
Drift detection built in
TestSpecClaim_* pins what the spec says, TestServerReality_* pins
what the server does. A server upgrade that flips either one makes
make test-contract red — and the failing test name is the drift report.
The full dev loop
Story > task > bug create, update, get, list — plus the status transitions in
between: activate, start, finish,
resolve, close. Notes land in the action stream.
Profiles for every instance
Canonical account@server keys with short aliases, --profile
one-offs and a shared session cache. Point one CLI at prod and lab without
mixing up targets.
Sessions: reuse until proven dead
Warm starts perform zero logins. A call that hits the expiry signature triggers a transparent re-login and one retry — renewal needs a password source, and the error says so instead of failing mysteriously.
Agent-ready
zentao add-skill pi|claude|agents installs a portable SKILL.md so coding
agents can work Zentao too — with the same output formats and exit-code contract
your scripts rely on.
Workflow
From zero to a closed story.
Login once
One command authenticates, saves the target as a profile and warms the session cache. Afterwards, commands need no credentials — and a wrong password is never masked by a cached session.
Create and comment
Stories capture the requirement, tasks are the work, bugs are what testing finds. Content is HTML (that is what open-source Zentao renders) — file and stdin forms avoid shell-escaping pain.
Move it along
Status transitions with the work notes attached — reviewing to active to closed, or a bug from resolve to confirm to close, all from the terminal.
The contract
Exit codes you can build on.
Machine-readable outcomes, documented and stable — the same contract for humans, shell pipelines and coding agents.
| rc | meaning |
|---|---|
| 0 | success — results on stdout |
| 1 | runtime or auth failure |
| 2 | usage error — wrong flags, missing arguments |
Three rings, one gate
make regression is the gate for every change: a unit ring (protocol
helpers, no server, under a second), a contract ring against a disposable Zentao
22.4 test environment, and an e2e ring that runs the compiled binary as a
subprocess and pins the user-visible contract.
Contract tests assert observed behavior — including server bugs like
productID placement differing per module. Silent success is the
failure mode this project exists to eliminate.
Command reference
Everything it can do.
| command | purpose |
|---|---|
zentao login | authenticate, save profile, warm sessions — password via --password-stdin stays out of shell history |
zentao comment add / list | comments on any object type — story, task, bug, epic, testcase, ... |
zentao story ... | create, update, get, list, activate, change, close |
zentao task ... | create, update, get, list, start, finish, close, activate |
zentao bug ... | create, update, get, list, resolve, confirm, close, activate |
zentao <module> list | list objects in a scope — --mine, --product N, --execution N, --json |
zentao profile | list, add, use, remove connection profiles |
zentao add-skill | install the bundled agent skill for Pi, Claude Code or portable agents |
zentao logout | drop cached sessions |
Install
Pick your channel.
Prebuilt binaries, a Homebrew formula, or straight from source.
Homebrew
macOS & Linux · prebuilt
Go
requires Go ≥ 1.26
Binary release
amd64 & arm64 tarballs