AgentQ CLI
Use agentq to extract fields from JSON or YAML, or to convert between formats without pulling in Python or jq-style tooling.
Invoke the Tool
Prefer the installed binary when it exists:
agentq -input state.json -q .jobs[0].id -format raw
If working inside this repository or the binary is not installed, run:
go run ./cmd/agentq -- -input state.json -q .jobs[0].id -format raw
Choose Flags
- Use
-inputto read from a file. Omit it to read from stdin. - Use
-qwith paths like.server.portor.items[0].id. - Use
-format jsonor-format yamlfor structured output. - Use
-format rawwhen the caller only needs a scalar string or number.
Apply Good Defaults
- Prefer
rawfor shell pipelines and agent follow-up steps. - Prefer
jsonwhen another tool will parse the result. - Fail fast if the path is ambiguous or missing instead of guessing.
Examples
Convert YAML to JSON:
go run ./cmd/agentq -- -input config.yaml -format json
Extract one value from stdin:
cat status.json | go run ./cmd/agentq -- -q .workers[0].healthy -format raw