Automic VaultAutomic Vault

brew

使用 Homebrew, MacPorts, Nix, chocolatey, pacman, scoop, winget 安装 tfenv

查看 tfenv 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install tfenv

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install tfenv

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

Linux

Nix已验证 · 92%
nix profile install nixpkgs#tfenv

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

Arch Linux pacman已验证 · 92%
sudo pacman -S terraform

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

Windows

Chocolatey已验证 · 92%
choco install terraform

Chocolatey community package catalog · terraform · 来源: community.chocolatey.org

Scoop已验证 · 92%
scoop install main/terraform

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

Windows Package Manager已验证 · 92%
winget install --id Hashicorp.Terraform -e

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

概览

软件包摘要

Terraform version manager inspired by rbenv

命令和别名

  • terraform
  • tfenv

历史

项目历史与用法

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.

时间线

  • 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.

安全态势

风险级别:orange

infrastructure mutation or orchestration signal.

风险分类器

orange 风险 · 中 置信度 · infrastructure

原因

  • infrastructure mutation or orchestration signal

信号

  • text:version manager

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
terraformcli全局可执行文件
tfenvcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本3.2.2
管理器更新时间2026-04-28
本地数据OK
上游当前
检测到的最新版本v3.2.2

https://github.com/tfutils/tfenv

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键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
Pulseupdated
依赖grep
macOS 提供的库unzip
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

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

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

tfenv

nix profile install nixpkgs#tfenv
  • normalized package name match
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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 依赖
  • 1 提供
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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
  • 匹配方式: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

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • 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