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

OpenTofu

$ tofu Foundation High Risk
Linux Foundation / OpenTofu · Cloud & Infra · MPL-2.0 · macos / linux / windows

OpenTofu (tofu) is the Linux Foundation-backed MPL-2.0 open-source fork of Terraform, preserving 100% HCL and CLI flag parity (-json, -input=false, -no-color, plan -out, show -json) while adding client-side state encryption.

FCRS-1.0 Score
92 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install opentofu
CLI vs MCP Decision CLI Preferred vs MCP

tofu runs validate -json, plan -out, and show -json directly on local HCL files with open-source MPL-2.0 licensing.

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 24 / 25

Full -json, -input=false, -no-color, validate -json, and show -json parity with Terraform.

  • Supports -json, -input=false, -no-color, and show -json
Trust & Safety 23 / 25

Saved plan -out + show -json safety plus native client-side state/plan encryption reduces secret exposure risk.

  • Saved plan verification plus native client-side state encryption
Setup & Portability 14 / 15

Single static Go binary via Homebrew, OS repos, and GitHub releases across macOS, Linux, and Windows.

  • Single Go binary via brew install opentofu
Utility & Efficiency 14 / 15

Drop-in HCL compatibility with OpenTofu's open provider registry and early for_each on variables/providers.

  • Full HCL compatibility with Terraform ecosystem
Maintenance & Lineage 9 / 10

Linux Foundation / CNCF-hosted opentofu/opentofu under permissive-copyleft MPL-2.0.

  • Official Linux Foundation opentofu/opentofu under MPL-2.0
Docs & Verifiability 8 / 10

Clean opentofu.org/docs/cli/ documentation and built-in --help.

  • Official docs at opentofu.org/docs/cli/

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Reads registry tokens from ~/.tofurc or ~/.terraform.d/credentials.tfrc.json, and uses standard cloud provider environment credentials.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

100% open-source (MPL-2.0); provisioned cloud infrastructure incurs provider billing.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# OpenTofu Agent Rules
- ALWAYS pass `-input=false -no-color` (and `-json` where supported).
- Run `tofu validate -json` and `tofu plan -out=tfplan.bin` + `tofu show -json tfplan.bin` before any apply.
- Never run `tofu apply -auto-approve` or `tofu destroy` without explicit user approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate HCL configuration in JSON
tofu validate -json -no-color

Validates local HCL modules and prints machine-readable JSON diagnostics.

Generate and inspect an execution plan as JSON
tofu plan -input=false -no-color -out=tfplan.bin && tofu show -json tfplan.bin

Previews exact infrastructure changes in JSON without modifying cloud resources.

Controlled Writes & Previews

Apply a verified plan artifact with JSON events
tofu apply -input=false -no-color -json tfplan.bin

Executes only the reviewed tfplan.bin with structured JSON progress events.

Strengths for Agents

  • + 100% open-source MPL-2.0 governance under the Linux Foundation.
  • + Native client-side state and plan encryption mitigates plaintext secret leaks in state files.
  • + Full -json, -input=false, plan, and show -json ergonomics.

Caveats & Pitfalls

  • ! Default registry uses registry.opentofu.org, which mirrors most—though not 100% of proprietary—Terraform Registry providers.
  • ! tofu init still requires network access or a local plugin mirror.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI