@wuchengbiao/quality-hub-cli
v0.1.1
Published
Quality Hub CLI for Agent Gateway and PRD test case generation
Readme
Quality Hub CLI
Quality Hub CLI is a command-line client for Quality Hub Agent Gateway. It can validate PRD requests locally and submit them to a deployed Quality Hub service for AI test case generation.
Install
npm install -g @wuchengbiao/quality-hub-cliConfigure
Linux/macOS:
export QUALITY_HUB_API_BASE_URL=http://47.103.10.12
export QUALITY_HUB_TOKEN=your-tokenWindows PowerShell:
$env:QUALITY_HUB_API_BASE_URL = "http://47.103.10.12"
$env:QUALITY_HUB_TOKEN = "your-token"Usage
qh version
qh mcp tools ui --format json
qh skill info security --format markdown
qh agent testcase.generate --input ./prd-agent-request.json --format jsonYou can also pass the endpoint and token explicitly:
qh agent testcase.generate \
--input ./prd-agent-request.json \
--format json \
--api-base-url http://47.103.10.12 \
--token "$QUALITY_HUB_TOKEN"Request Example
{
"requestId": "REQ-PRD-001",
"externalSystem": "npm-cli",
"externalTaskId": "PRD-001",
"agent": "testcase.generate",
"mode": "ASYNC",
"project": {
"projectId": 1
},
"input": {
"documentType": "PRD",
"title": "Login PRD",
"requirementText": "Paste PRD text here."
},
"options": {
"modelConfigId": 1,
"maxCaseCount": 80,
"autoConfirmCases": false
},
"skills": [
{ "type": "builtin", "name": "test-design" },
{ "type": "builtin", "name": "api-test" },
{ "type": "builtin", "name": "security" }
]
}Notes
- Node.js 20 or newer is required.
- The API token must include
ai:agent-gateway:runfor submit andai:agent-gateway:listfor status/result queries. - If
options.modelConfigIdis omitted, Agent Gateway accepts the request but does not create the underlying AI test-design job.
