tfenv
$ tfenv Community Low Risktfenv manages multiple installed Terraform versions via shims and .terraform-version files. It automates downloading, verifying, and switching Terraform binaries in CI or local shells, though it outputs plain text rather than JSON and targets Terraform only.
brew install tfenv Local shell shim and binary version switcher; MCP servers cannot manage $PATH shims.
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
Runs non-interactively via .terraform-version and TFENV_AUTO_INSTALL=true, but lacks --json output and relies on Bash text formatting.
- Non-interactive install/use from
.terraform-version - No
--jsonoutput flag; plain-text line output only
Verifies PGP signatures/checksums when gpg is available and only mutates local shim directories under ~/.tfenv.
- Local binary management only; no cloud infrastructure mutations
Written in Bash; works cleanly on macOS and Linux via Homebrew or git clone, but does not natively support Windows outside WSL/Git Bash.
- Requires Bash environment; macOS and Linux primary targets
Reliable for Terraform version pinning, though OpenTofu/Terragrunt users increasingly prefer tenv.
- Scoped strictly to Terraform binaries
Mature community-maintained project (tfutils/tfenv) under MIT license, though development pace has slowed.
- Community repo
tfutils/tfenvunder MIT
Clear single-page README covering environment variables, .terraform-version, and subcommands.
- README documents all subcommands and
TFENV_*env vars
Security, Auth & Guardrails
No account auth required; downloads public HashiCorp releases and optionally reads TFENV_NETRC_PATH or proxy env vars.
MIT open-source and free; downloads official Terraform binaries from HashiCorp.
# tfenv Agent Rules - Run `tfenv version-name` before `terraform` commands to confirm the active binary version. - Prefer `tfenv install` with `.terraform-version` rather than `tfenv install latest`. - Do not run `tfenv uninstall` without checking if other repos share that version.
Agent-Ready Command Recipes
Safe Read-Only Queries
tfenv list
Prints installed Terraform versions and highlights the active version.
tfenv version-name
Resolves and prints the effective Terraform version from .terraform-version or global pin.
Controlled Writes & Previews
tfenv install && tfenv use
Reads .terraform-version and installs/activates that exact version non-interactively.
Strengths for Agents
- + Honors
.terraform-versionautomatically viaTFENV_AUTO_INSTALL=true. - + Simple, predictable commands (
tfenv list,tfenv install,tfenv use) with no prompts. - + Supports PGP signature verification of downloaded binaries.
Caveats & Pitfalls
- ! No JSON output format; agents must parse plain-text version lists.
- ! Bash-based implementation lacks native Windows support and only manages Terraform (not OpenTofu).