jo
$ jo Community Low Riskjo constructs properly escaped JSON objects and arrays directly from shell arguments (jo name=alice active=true count=3), eliminating brittle string interpolation and quoting bugs when AI agents or scripts build JSON payloads for curl or API CLIs.
brew install jo jo eliminates shell JSON-escaping syntax errors in curl and webhook calls in a single tiny C binary.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Pure deterministic JSON emitter with -p pretty print, -a array mode, -B boolean coercion toggle, and zero ANSI clutter.
- Pure stdout JSON generator with
-a,-p, and-B
Zero side effects; eliminates JSON injection and broken-quoting bugs in shell pipelines.
- Stateless read-only JSON formatter preventing shell injection
Tiny C binary packaged in Homebrew, apt, apk, dnf, and Cygwin/WSL.
- Zero-dependency C binary across OS package managers
Solves one sharp problem—safe shell-to-JSON payload creation—with near-zero startup cost.
- Prevents quoting bugs when generating JSON for
curl/ CLIs
Mature jpmens/jo C utility under GPL-2.0.
- Established
jpmens/jorepository
Concise jo.md man page covering coercion and nesting rules.
- Official man page (
jo.md)
Security, Auth & Guardrails
None; stateless stdin/argv to JSON stdout generator.
100% free and GPL-2.0 open-source.
# jo Agent Rules - Use `jo` instead of hand-interpolating shell variables into JSON strings. - Remember `jo` coerces `true`/`false`/`null`/numbers automatically; use `:=` or `-s` (`key@file`, `key=string`) when forcing string types. - Pipe `jo` output directly into `curl -d @-` or API CLIs.
Agent-Ready Command Recipes
Safe Read-Only Queries
jo -p name="Alice O'Connor" role=admin retries=3 active=true
Emits pretty-printed (-p) valid JSON with automatic type coercion and string escaping.
jo -a alpha beta gamma
Constructs a valid JSON string array cleanly without manual bracket/quote concatenation.
Strengths for Agents
- + Eliminates brittle bash quoting and escaping bugs when building JSON payloads.
- + Supports nested objects (
jo user[name]=alice) and reading values from files (key=@file). - + Sub-millisecond C binary with zero dependencies.
Caveats & Pitfalls
- ! Automatic type coercion (
123-> number) can surprise callers expecting strings unlesskey=stringoverrides or-sare used.