macOS
brew install tfenvlocal Homebrew formula metadata
sudo port install tfenvMacPorts ports tree · sysutils/tfenv/Portfile · 来源: api.github.com
安装
brew install tfenvlocal Homebrew formula metadata
sudo port install tfenvMacPorts ports tree · sysutils/tfenv/Portfile · 来源: api.github.com
nix profile install nixpkgs#tfenvnixpkgs package indexes · pkgs/by-name/tf/tfenv/package.nix · 来源: api.github.com
sudo pacman -S terraformArch Linux sync databases · terraform · 来源: geo.mirror.pkgbuild.com
choco install terraformChocolatey community package catalog · terraform · 来源: community.chocolatey.org
scoop install main/terraformScoop official bucket manifest trees · bucket/terraform.json · 来源: api.github.com
winget install --id Hashicorp.Terraform -eWindows Package Manager source index · Hashicorp.Terraform · 来源: cdn.winget.microsoft.com
概览
Terraform version manager inspired by rbenv
历史
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.
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.
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.
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.
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.
安全态势
infrastructure mutation or orchestration signal.
orange 风险 · 中 置信度 · infrastructure
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
.terraform-version~/.terraform-versionCredential-bearing paths to review before unattended agent runs.
$TFENV_NETRC_PATH可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
terraform | cli | 全局可执行文件 | |
tfenv | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/tfutils/tfenv
安装元数据
| 软件包键 | brew:tfenv |
|---|---|
| 版本 | 3.2.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/tfenv |
| 主页 | https://github.com/tfutils/tfenv |
| 仓库 | https://github.com/tfutils/tfenv |
| 上游文档 | https://github.com/tfutils/tfenv |
| 许可证 | MIT |
| 源码归档 | https://github.com/tfutils/tfenv/archive/refs/tags/v3.2.2.tar.gz |
| 最后更新 | 2026-04-28T22:04:46Z |
| Pulse | updated |
| 依赖 | grep |
| macOS 提供的库 | unzip |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | tfenv |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Conflicts With |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
tfenv
nix profile install nixpkgs#tfenvtfenv
sudo port install tfenvterraform
sudo port install terraformterraform
nix profile install nixpkgs#terraformterraform 1.15.6-1
HashiCorp tool for building and updating infrastructure as code idempotently
https://github.com/hashicorp/terraform
sudo pacman -S terraformterraform
choco install terraformmain/terraform
scoop install main/terraformHashicorp.Terraform
winget install --id Hashicorp.Terraform -eHashicorp.Terraform.Alpha
winget install --id Hashicorp.Terraform.Alpha -eHashicorp.Terraform.Beta
winget install --id Hashicorp.Terraform.Beta -eHashicorp.Terraform.RC
winget install --id Hashicorp.Terraform.RC -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.