Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Jsonnet

$ jsonnet Official Low Risk
Google · Database & Data · Apache-2.0 · macos / linux / windows

Jsonnet (jsonnet) is Google's functional configuration and data templating language that extends JSON with variables, conditionals, imports, and mixins, evaluating deterministically to standard JSON (-e, -o, --ext-str) with zero side effects.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
brew install jsonnet
CLI vs MCP Decision CLI Only

Evaluates modular .jsonnet templates into deterministic JSON locally (jsonnet --ext-str), impossible to replicate accurately via LLM guessing.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Outputs valid JSON natively, supports -e inline evaluation, -S raw string output, --ext-str/--tla-str parameterization, and deterministic exit codes.

  • Native JSON stdout
  • Supports -e, -o, -m, and --ext-str
Trust & Safety 24 / 25

Hermetic language design cannot make network calls or execute shell commands; file writes only happen with -o or -m.

  • Hermetic evaluator with no network/exec side effects
Setup & Portability 13 / 15

Available via Homebrew, Linux packages, and official GitHub releases (plus go-jsonnet drop-in alternatives).

  • Distributed via brew install jsonnet and releases
Utility & Efficiency 13 / 15

Eliminates YAML/JSON copy-paste across Kubernetes, Grafana (grafonnet), and CI configs with real functions and mixins.

  • Hermetic composable JSON templating with jsonnetfmt
Maintenance & Lineage 8 / 10

Official Google repository (google/jsonnet) under Apache-2.0, alongside widely used google/go-jsonnet.

  • Official google/jsonnet repository
Docs & Verifiability 8 / 10

Clear language tutorial, standard library docs, and CLI reference on jsonnet.org.

  • Official documentation at jsonnet.org

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None; hermetic evaluator with no network or credential store access.

Side Effects
Read-Only Local Write
Cost & Quotas

Apache-2.0 open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Jsonnet Agent Rules
- Evaluate templates to stdout first (`jsonnet file.jsonnet`) before writing with `-o` or `-m <dir>`.
- Pass explicit `--ext-str key=val` / `--tla-str key=val` arguments rather than relying on implicit environment variables.

Agent-Ready Command Recipes

Safe Read-Only Queries

Evaluate a Jsonnet template to JSON stdout
jsonnet --ext-str env=prod config.jsonnet

Renders config.jsonnet with external string variables and prints valid JSON to stdout.

Evaluate an inline Jsonnet expression
jsonnet -e '{ a: 1, b: self.a + 2 }'

Tests a Jsonnet snippet directly via -e (--exec) without creating temporary files.

Controlled Writes & Previews

Render Jsonnet output to a JSON file
jsonnet config.jsonnet -o out.json

Writes rendered JSON to out.json using -o (--output-file).

Strengths for Agents

  • + Hermetic evaluation guarantees identical JSON output across machines with zero side effects.
  • + Native JSON output and -e inline evaluation work seamlessly with jq.
  • + Built-in jsonnetfmt enforces canonical formatting.

Caveats & Pitfalls

  • ! Multi-file output (-m <dir>) writes multiple files directly into the target directory—preview with stdout or a scratch dir first.
  • ! Learning curve for self/super lazy object inheritance when debugging complex templates.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI