Automic VaultAutomic Vault

brew

Install tfenv with Homebrew, MacPorts, Nix, chocolatey, pacman, scoop, winget

Terraform version manager inspired by rbenv. Version 3.2.2 via Homebrew; verified 2026-04-28.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install tfenv

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install tfenv

MacPorts ports tree · sysutils/tfenv/Portfile · source: api.github.com

Linux

Nixverified · 92%
nix profile install nixpkgs#tfenv

nixpkgs package indexes · pkgs/by-name/tf/tfenv/package.nix · source: api.github.com

Arch Linux pacmanverified · 92%
sudo pacman -S terraform

Arch Linux sync databases · terraform · source: geo.mirror.pkgbuild.com

Windows

Chocolateyverified · 92%
choco install terraform

Chocolatey community package catalog · terraform · source: community.chocolatey.org

Scoopverified · 92%
scoop install main/terraform

Scoop official bucket manifest trees · bucket/terraform.json · source: api.github.com

Windows Package Managerverified · 92%
winget install --id Hashicorp.Terraform -e

Windows Package Manager source index · Hashicorp.Terraform · source: cdn.winget.microsoft.com

overview

Package summary

Terraform version manager inspired by rbenv

Commands and aliases

  • terraform
  • tfenv

history

Project history and usage

tfenv is a Terraform version manager modeled after `rbenv`. It installs Terraform versions, switches the active version, and lets projects pin versions with `.terraform-version` files.

Project history

The README presents tfenv as a Terraform version manager inspired by rbenv, with a shell-script installation model: clone the repository into `~/.tfenv`, add its `bin` directory to PATH, or install it through Homebrew or other package managers.

Its history follows Terraform's own growth as teams moved from one global Terraform binary to many project-specific versions. tfenv added project version files, automatic installation, `latest` and regex-like selectors, minimum-required and latest-allowed resolution, checksum/signature verification paths, custom remotes, and private mirror support.

The release history shows long maintenance rather than a one-off wrapper. The v2.2.0 notes in 2021 included CI migration to GitHub Actions and macOS/Homebrew grep handling. v3.0.0 in 2022 was described as a major update with bashlog refactoring, Mac fixes, auto-install/use fixes, and netrc/private mirror support. v3.1.0 in 2026 was the first release since v3.0.0 and added more constraint handling, locks, custom remote compatibility, and broader tests.

Adoption history

tfenv is one of the more visible Terraform helper tools in package-manager culture: the repository shows thousands of GitHub stars, Homebrew packages it directly, and the input metadata also records MacPorts and Nix packages. Its name and workflow match the pattern used by language/runtime version managers such as rbenv and pyenv.

Adoption is driven by team reproducibility. A repository can include `.terraform-version`, and developers or CI jobs that use tfenv get the intended Terraform version instead of relying on a manually managed global binary.

How it is used

Common commands include `tfenv install`, `tfenv use`, `tfenv uninstall`, `tfenv list`, and `tfenv list-remote`. If no explicit version is passed, `tfenv install` and `tfenv use` resolve from `TFENV_TERRAFORM_VERSION`, `.terraform-version`, or defaults such as `latest`.

The `TFENV_NETRC_PATH` setting supports credentials for custom remotes, and `TFENV_REMOTE` lets users install Terraform from mirrors such as internal artifact repositories rather than HashiCorp's default release host.

Why package nerds care

tfenv matters because it makes Terraform behave like a language runtime in a polyversion codebase. Package managers install tfenv once; tfenv then mediates the actual Terraform binaries needed by individual repositories.

For infrastructure engineers, this avoids a class of subtle plan/apply drift caused by the wrong Terraform CLI version. For package catalogs, it is a canonical example of a version-manager formula rather than a Terraform distribution itself.

Timeline

  • 2021: v2.2.0 release notes mention GitHub Actions migration and Homebrew-related macOS grep handling.
  • 2022: v3.0.0 major update adds Mac, auto-install/use, netrc, and private mirror improvements.
  • 2026: v3.1.0 is described as the first release since v3.0.0, with constraint, locking, and testing improvements.
  • 2026: v3.2.2 is listed as the latest release on the official releases page.

Related projects

  • `rbenv` is the version-manager pattern explicitly cited by tfenv.
  • Terraform is the binary managed by tfenv.
  • HashiCorp release servers and private mirrors are the remote sources tfenv installs from.

security posture

Risk level: orange

infrastructure mutation or orchestration signal.

Risk classifier

orange risk · medium confidence · infrastructure

Why

  • infrastructure mutation or orchestration signal

Signals

  • text:version manager

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 1 platform targets.
  • Installs with 1 runtime dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
.terraform-version~/.terraform-version

Credential files

Credential-bearing paths to review before unattended agent runs.

Unix
$TFENV_NETRC_PATH

executables

Installed executables

CommandKindExposureNote
terraformcliglobal executable
tfenvcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version3.2.2
manager updated2026-04-28
local dataok
upstreamcurrent
latest detectedv3.2.2

https://github.com/tfutils/tfenv

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:tfenv
Version3.2.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/tfenv
Homepagehttps://github.com/tfutils/tfenv
Repositoryhttps://github.com/tfutils/tfenv
Upstream docshttps://github.com/tfutils/tfenv
LicenseMIT
Source archivehttps://github.com/tfutils/tfenv/archive/refs/tags/v3.2.2.tar.gz
Last updated2026-04-28T22:04:46Z
Pulseupdated
Dependenciesgrep
Uses from macOSunzip
Bottleavailable (on all)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nametfenv
Version Scheme0
Revision0
Head VersionHEAD
Conflicts With
  • tenv
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

tfenv

nix profile install nixpkgs#tfenv
  • normalized package name match
  • Matched by: Tfenv
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/tf/tfenv/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

tfenv

sudo port install tfenv
  • normalized package name match
  • Matched by: Tfenv
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/tfenv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
MacPorts94%

terraform

sudo port install terraform
  • installed executable or alias match
  • Matched by: Terraform
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/terraform/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Nix92%

terraform

nix profile install nixpkgs#terraform
  • installed executable or alias match
  • Matched by: Terraform
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: terraform from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
pacman92%

terraform 1.15.6-1

HashiCorp tool for building and updating infrastructure as code idempotently

https://github.com/hashicorp/terraform

sudo pacman -S terraform
  • License: BUSL-1.1
  • Architecture: x86_64
  • 1 dependencies
  • 1 provides
  • 1 optional deps
  • installed executable or alias match
  • Matched by: Terraform
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: terraform from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
Chocolatey92%

terraform

choco install terraform
  • installed executable or alias match
  • Matched by: Terraform
Chocolatey community package catalog · community.chocolatey.org · Chocolatey community package catalog: terraform from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','telegram.install'
Scoop92%

main/terraform

scoop install main/terraform
  • installed executable or alias match
  • Matched by: Terraform
Scoop official bucket manifest trees · api.github.com · Scoop official bucket manifest trees: bucket/terraform.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
winget92%

Hashicorp.Terraform

winget install --id Hashicorp.Terraform -e
  • installed executable or alias match
  • Matched by: Terraform
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Hashicorp.Terraform from https://cdn.winget.microsoft.com/cache/source.msix
winget92%

Hashicorp.Terraform.Alpha

winget install --id Hashicorp.Terraform.Alpha -e
  • installed executable or alias match
  • Matched by: Terraform
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Hashicorp.Terraform.Alpha from https://cdn.winget.microsoft.com/cache/source.msix
winget92%

Hashicorp.Terraform.Beta

winget install --id Hashicorp.Terraform.Beta -e
  • installed executable or alias match
  • Matched by: Terraform
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Hashicorp.Terraform.Beta from https://cdn.winget.microsoft.com/cache/source.msix
winget92%

Hashicorp.Terraform.RC

winget install --id Hashicorp.Terraform.RC -e
  • installed executable or alias match
  • Matched by: Terraform
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Hashicorp.Terraform.RC from https://cdn.winget.microsoft.com/cache/source.msix

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment