autoworker-hub-cli
v1.0.0
Published
Spec-driven CLI for the full Autoworker Hub Control API, including admin operations. Zero runtime dependencies.
Maintainers
Readme
autoworker-hub-cli
Spec-driven command-line client for the full Autoworker Hub Control API,
including admin and control-plane operations. Pure Node.js (>= 20.12),
zero runtime dependencies — every command is derived at runtime from the
bundled OpenAPI spec (reference/openapi.json).
Looking for the safe, project-scoped tooling instead? See the sibling package
autoworker-hub-project, which deliberately excludes admin mutations.
Install
npm i -g autoworker-hub-cli
# or run without installing
npx autoworker-hub-cli --helpConfiguration
| Setting | How |
| --- | --- |
| Base URL | --base-url https://hub.example.com flag, or AUTOWORKER_HUB_CLI_BASE_URL env var |
| Bearer token | AUTOWORKER_HUB_CLI_TOKEN env var only — never a CLI flag, never logged |
export AUTOWORKER_HUB_CLI_BASE_URL=https://hub.example.com
export AUTOWORKER_HUB_CLI_TOKEN=... # control-plane bearer tokenUsage
autoworker-hub-cli <tag> <operation> [flags]autoworker-hub-cli --helplists tags (command groups).autoworker-hub-cli <tag> --helplists that tag's operations.autoworker-hub-cli <tag> <operation> --helpshows the operation's parameters (name, location, required, description) from the spec.
Path, query, and header parameters become --kebab-case flags. Request
bodies are passed as JSON via --data '<json>', --data @file.json, or
--data - (stdin). Responses print as raw JSON to stdout
(pretty-printed when stdout is a TTY). Non-2xx responses print
ERROR: <status> <body> to stderr and exit 1.
Examples
# Liveness + version
autoworker-hub-cli system get-health
autoworker-hub-cli system get-version
# List tenants, inspect one
autoworker-hub-cli tenants list-tenants
autoworker-hub-cli tenants get-tenant --tenant-id acme
# Create a tenant (admin operation)
autoworker-hub-cli tenants create-tenant --data '{"tenantId":"acme","displayName":"Acme"}'
# Start a run and stream its Server-Sent Events
autoworker-hub-cli tenants create-tenant-run --tenant-id acme --data @run.json
autoworker-hub-cli tenants stream-tenant-run-events --tenant-id acme --run-id run-123Command groups
The canonical spec does not declare OpenAPI tags, so groups are derived
from the first URL path segment (after /v1): tenants, flavors,
skills, secrets, share-groups, eval-runs, metrics, admin,
config, codex-auth, autoworker-agent, agent-policy, a2a, and more.
Single-operation system endpoints (healthz, readyz, version,
reconcile, the schema downloads, and outbox metrics) are collapsed
into the system group.
Streaming and binary responses
Endpoints whose success response is text/event-stream (for example
tenants stream-tenant-run-events) print the raw SSE stream
line-by-line as it arrives; no client-side event parsing or reconnect is
performed. application/octet-stream responses (file downloads) are
written as raw bytes to stdout — redirect to a file.
Regenerating the spec
The CLI is generated at runtime from the bundled
reference/openapi.json. To refresh it from the repo's canonical
api/openapi.yaml (maintainers, before publishing):
npm run sync-specThe YAML-to-JSON conversion happens only in this build step (the yaml
devDependency); the published package never parses YAML at runtime.
License
MIT
