tfenv is a Terraform version manager inspired by rbenv that allows developers to install, switch between, and manage multiple versions of Terraform on a single machine.
The tool solves the problem of managing different Terraform versions across projects with varying requirements. It works by providing commands to install specific versions of Terraform, list available versions, and set which version should be active either globally or per-project. Version selection can be controlled through environment variables or a .terraform-version file in your project directory. The tool can also automatically detect the minimum required or maximum allowed Terraform version by scanning your Terraform configuration files. Installation downloads are verified against HashiCorp's published SHA256 hashes, with optional signature verification using Keybase or GnuPG.
Developers should choose tfenv if they work with multiple Terraform projects that require different versions. It suits teams and individuals who need to switch between versions frequently without manual path manipulation. The tool supports macOS (including Apple Silicon), Linux (including ARM), and Windows via Git Bash, making it accessible across common development environments. Installation is straightforward through package managers like Homebrew and AUR, or by manual checkout and PATH configuration.
The project maintains active engagement with contributions and security considerations, as evidenced by dedicated sections in the README addressing both areas. Development activity shows responsiveness to platform compatibility needs, with explicit support added for Windows and ARM architectures. The tool demonstrates attention to verification and security practices by implementing hash and signature checking for downloaded binaries.