Jsonnet
$ jsonnet Official Low RiskJsonnet (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.
brew install jsonnet Evaluates modular .jsonnet templates into deterministic JSON locally (jsonnet --ext-str), impossible to replicate accurately via LLM guessing.
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 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
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
Available via Homebrew, Linux packages, and official GitHub releases (plus go-jsonnet drop-in alternatives).
- Distributed via
brew install jsonnetand releases
Eliminates YAML/JSON copy-paste across Kubernetes, Grafana (grafonnet), and CI configs with real functions and mixins.
- Hermetic composable JSON templating with
jsonnetfmt
Official Google repository (google/jsonnet) under Apache-2.0, alongside widely used google/go-jsonnet.
- Official
google/jsonnetrepository
Clear language tutorial, standard library docs, and CLI reference on jsonnet.org.
- Official documentation at jsonnet.org
Security, Auth & Guardrails
None; hermetic evaluator with no network or credential store access.
Apache-2.0 open-source CLI; completely free.
# 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
jsonnet --ext-str env=prod config.jsonnet
Renders config.jsonnet with external string variables and prints valid JSON to stdout.
jsonnet -e '{ a: 1, b: self.a + 2 }' Tests a Jsonnet snippet directly via -e (--exec) without creating temporary files.
Controlled Writes & Previews
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
-einline evaluation work seamlessly withjq. - + Built-in
jsonnetfmtenforces 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/superlazy object inheritance when debugging complex templates.