jp (JMESPath)
$ jp Official Low RiskOfficial command-line implementation (jp) of the JMESPath query specification. Evaluates expressions against JSON files (-f) or stdin and prints JSON or unquoted strings (-u) with zero external dependencies.
brew install jp Runs JMESPath projections locally in milliseconds (jp -u)—ideal for filtering large JSON payloads before they enter agent context.
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
Outputs valid JSON by default, supports -u / --unquoted for scalar extraction, reads -f or stdin non-interactively, and returns clean exit codes.
- Native JSON stdout and
-uraw string mode - Supports
-f <filename>andJP_UNQUOTEDenv var
Strictly read-only stream filter with no file-mutation flags, network calls, or shell execution primitives.
- Pure read-only JMESPath expression evaluator
Single static Go binary available via Homebrew, go install, and GitHub Releases across macOS, Linux, and Windows.
- Distributed via
brew install jpand static binaries
Standardized JMESPath syntax matches AWS CLI (--query) and Ansible filters, though less expressive than jq for arbitrary transforms.
- Implements full JMESPath specification
Official JMESPath organization repo under Apache-2.0; feature-complete spec means infrequent releases.
- Official
jmespath/jprepository
Well-documented JMESPath grammar and interactive tutorial at jmespath.org, plus concise --help.
- Official spec and tutorial at jmespath.org
Security, Auth & Guardrails
None; operates purely on local JSON files and stdin/stdout streams.
Apache-2.0 open-source CLI; completely free.
# jp (JMESPath) Agent Rules - Prefer `jp -f <file> '<expr>'` or stdin piping to project only needed fields. - Pass `-u` (`--unquoted`) when extracting scalar strings for shell variables.
Agent-Ready Command Recipes
Safe Read-Only Queries
jp -u 'items[*].name' < data.json
Extracts matching field values as unquoted text or JSON without loading the full document.
jp -f data.json "items[?status=='active'].{id: id, name: name}" Reads data.json directly via -f and projects only active items into compact JSON objects.
Strengths for Agents
- + 100% read-only JSON projection with zero side effects.
- + Identical query language to
aws --query, simplifying cross-tool agent prompts. - +
-u(--unquoted) avoids extra quote-stripping in shell pipelines.
Caveats & Pitfalls
- ! Cannot perform multi-step mutations or stream NDJSON as flexibly as
jq. - ! Upstream
jmespath/jpreceives minimal maintenance updates.