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

CUE

$ cue Official Low Risk
CUE · Code & DevOps · Apache-2.0 · macos / linux / windows

Official CLI for the CUE constraint-based configuration language, unifying schema validation, JSON/YAML/OpenAPI generation, and policy checking. Gives agents deterministic cue vet validation, cue export --out json compilation, and cue fmt --check verification.

FCRS-1.0 Score
94 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install cue
CLI vs MCP Decision CLI Only

Evaluates and validates CUE schemas and JSON/YAML payloads locally in milliseconds.

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

Supports --out json / jsonl / yaml, -e <expr> field extraction, cue fmt --check, and rich cue help subcommands.

  • cue export --out json -e <expr> supports native JSON output and expression filtering
  • cue fmt --check supports non-destructive verification
Trust & Safety 24 / 25

Hermetic evaluation without arbitrary code execution; vet, eval, and export are purely read-only unless --outfile is set.

  • Purely declarative hermetic evaluation with zero side effects
Setup & Portability 15 / 15

Single static Go binary available via Homebrew, go install, Docker, and GitHub Releases.

  • Cross-platform single Go executable
Utility & Efficiency 14 / 15

Unifies validation (vet), transformation (export), and schema generation (import OpenAPI/JSON Schema) in one tool.

  • Replaces separate schema validator and templating tools
Maintenance & Lineage 9 / 10

Official CUE project (cue-lang/cue) under Apache-2.0 with active upstream development.

  • Official cue-lang/cue repository
Docs & Verifiability 9 / 10

Thorough command documentation at cuelang.org plus built-in cue help <topic> guides.

  • Official CLI reference and embedded cue help topics

Security, Auth & Guardrails

Auth Modes
No Auth OAuth Browser Env API Key
Credential Storage

No auth needed for local vet/eval/export; optional CUE Central Registry logins store tokens via cue login or CUE_TOKEN.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source Go binary; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# CUE (cue) Agent Rules
- Always pass `-c` (concrete) to `cue vet` when validating production data so incomplete fields do not pass silently.
- Use `cue export --out json -e <field>` to extract only the evaluated JSON subtree needed.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate JSON or YAML data against a CUE schema
cue vet -c schema.cue data.yaml

Validates concrete values (-c) in data.yaml against CUE constraints without modifying files.

Compile CUE configuration to JSON
cue export --out json -e config app.cue

Evaluates and extracts the config field as validated JSON to stdout.

Controlled Writes & Previews

Format CUE files after check
cue fmt --check . && cue fmt .

Verifies and formats .cue source files deterministically.

Strengths for Agents

  • + Hermetic constraint evaluation prevents arbitrary script execution while validating complex configs.
  • + Native cue export --out json -e <expr> provides both JSON serialization and field projection.

Caveats & Pitfalls

  • ! cue vet without -c allows incomplete/abstract fields unless explicitly constrained.
  • ! Error messages from deep constraint unification failures can be verbose.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI