Agent CLI
for cmdhub.
Schema-aware transforms between one command contract and another.
cmdhub get agent
data_object Agent Contract
Agents should start with auth/status and discovery commands, inspect schemas before composition, and treat commands marked as mutating as state-changing operations.
Output
Use human output for normal reads, `--json` for scripting or complete structured fields, and `--jsonl` for upstream pipe inputs.
Auth
local model profile. Provider credentials stay with the source and destination CLIs.
Refs
Prefer list/search, then short refs or piped JSONL. Use `resolve` to inspect cached refs.
Schemas
Use `agent schema` and `catalog.json` to inspect fields, flags, examples, and side effects.
Auth scopes
local model/profile configurationterminal Command Reference
Generated from source. Global flags apply to all commands.
Global Flags
--json
bool
Emit JSON machine output--jsonl
bool
Emit JSONL records for piping--output, -o
string
Compatibility output mode: json|jsonl. Prefer --json or --jsonl--view
string = summary
View mode: summary|full--profile
string
Config/auth profile--config
string
Config path override--quiet, -q
bool
Suppress non-essential diagnostics--debug
bool
Enable debug diagnostics--limit
int = 50
Maximum items to emit--page-size
int = 50
Requested upstream page size--cursor
string
Continuation cursor--no-paginate
bool
Fetch only one page--version, -v
bool
Print version informationagent adapt
Compile one typed stream into another--dry-run
bool
Dry run mode--model
string
Model profile name--to
string
Target command--via
string
Optional intermediate intent schemaagent auth
Show local agent auth stateagent auth login
No-op for local agent authagent auth logout
No-op for local agent auth logoutagent auth refresh
No-op for local agent auth refreshagent auth status
Show local agent auth statusagent auth whoami
Show local agent model profile identityagent capabilities
Describe agent CLI capabilitiesagent doctor
Run agent CLI diagnosticsagent explain
Explain how stdin could map to a target schema--model
string
Model profile name--to
string
Target command--via
string
Optional intermediate intent schemaagent login
No-op for local agent authagent logout
No-op for local agent auth logoutagent model
Manage model execution profilesagent model add
Add or update a model execution profile--api-key-stdin
bool
Read API key from stdin--base-url
string
Model endpoint base URL--model
string
Provider model name--protocol
string
Model protocol override--provider
string
Model provider: ollama|openai|anthropic|claude|gemini|custom--structured-output
bool = true
Backend supports structured JSON outputagent model list
List model execution profilesagent model remove
Remove a model execution profile and its stored API keyagent model show
Show a model execution profileagent model test
Test a model execution profileagent model use
Set the default model execution profileagent resolve
Resolve an agent schema or command targetagent schema
Show schema for a command or intentShow schema for a command or intent.
Use –to for command targets and intent schema ids. The –via flag is accepted as a compatibility alias for intent schema ids used with adapt/explain.
--in
bool
Show input schema--out
bool
Show output schema--to
string
Target command--via
string
Intent schema id alias for --toagent validate
Validate stdin against a target or intent schema--schema
string
Intent schema id--to
string
Target commandagent version
Show agent version informationplay_circle Live Examples
Output captured from a real workspace. Regenerate with
scripts/gen-docs.sh --update.
auth
Agent auth: local Provider credentials: none needed Model profile: local Next: agent model list
lifecycle
agent capabilities auth show local auth status capabilities doctor run local diagnostics model manage model execution profiles schema inspect command and intent schemas transform validate validate stdin against a schema version Output: json, jsonl Identifiers: stdin, schema_id, command_target Next: agent schema --to intent.contact.v1 --out
schemas
Schema: intent.contact.v1 Command: intent.contact.v1 Direction: output Required: name, confidence Next: agent validate --schema intent.contact.v1
alt_route Composition Patterns
Bridge your ecosystem with zero middleware.
# Adapt a Gmail message into a calendar-event input contract
gmail message list --label INBOX --limit 1 --jsonl \
| agent adapt --to "gcal event create"