MIT · tested against Zentao 22.4

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.

$ brew install rioliu/tap/zentao-cli-go
story task bug epic testcase execution comment

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.

01

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.

$ zentao login -s http://zentao.corp/zentao \ -u admin --password-stdin --as prod logged in to http://zentao.corp/zentao as admin, profile saved: admin@...
02

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.

$ zentao story create --product 1 \ --title 'Fix login timeout' ... story #14 created $ zentao comment add story 14 \ --content '<p>MR: !11 merged</p>' comment added to story #14
03

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.

$ zentao story activate 14 \ --comment '<p>starting work</p>' story #14 activated $ zentao story close 14 --reason done story #14 closed

The contract

Exit codes you can build on.

Machine-readable outcomes, documented and stable — the same contract for humans, shell pipelines and coding agents.

rcmeaning
0success — results on stdout
1runtime or auth failure
2usage 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.

commandpurpose
zentao loginauthenticate, save profile, warm sessions — password via --password-stdin stays out of shell history
zentao comment add / listcomments 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> listlist objects in a scope — --mine, --product N, --execution N, --json
zentao profilelist, add, use, remove connection profiles
zentao add-skillinstall the bundled agent skill for Pi, Claude Code or portable agents
zentao logoutdrop cached sessions

Install

Pick your channel.

Prebuilt binaries, a Homebrew formula, or straight from source.

Homebrew

macOS & Linux · prebuilt

$ brew install rioliu/tap/zentao-cli-go

Go

requires Go ≥ 1.26

$ go install …/cmd/zentao@latest

Binary release

amd64 & arm64 tarballs

$ …/releases/latest download ↓