# 使用 Homebrew 安装 tofuenv

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

## 安装

```sh
sudo av install brew:tofuenv
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tofuenv
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:tofuenv
- **软件包管理器:** Homebrew
- **版本:** 1.0.7
- **来源摘要:** OpenTofu version manager inspired by tfenv
- **主页:** <https://tofuutils.github.io/tofuenv/>
- **仓库:** <https://github.com/tofuutils/tofuenv>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- tofuenv (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.0.7
## 项目历史与用法

tofuenv is an OpenTofu version manager, modeled after tfenv, for installing and selecting tofu versions from the shell.

### 项目历史

tofuenv belongs to the OpenTofu post-fork tooling wave. OpenTofu itself was created after HashiCorp's 2023 Terraform license change and reached a first stable release on January 10, 2024.

The tofuenv README presents the project as an OpenTofu version manager inspired by tfenv, with support for macOS, Linux, and limited Windows/git-bash testing.

### 采用历史

The README documents installation through Homebrew, the Arch User Repository, and a Puppet module, while the input package facts list Homebrew packaging. This suggests its main adoption path is among shell users who already manage infrastructure tools through package managers and dotfiles.

### 使用方式

tofuenv installs explicit OpenTofu versions, latest versions, regex-selected latest versions, and versions inferred from OpenTofu required_version constraints. With no version argument it resolves TOFUENV_TOFU_VERSION first, then .opentofu-version files, then defaults to latest.

The tool also exposes package-nerd knobs such as tofuenv_REMOTE for custom release mirrors, tofuenv_ARCH for architecture selection, tofuenv_CONFIG_DIR for state/config placement, and tofuenv_NETRC_PATH for credentials when accessing a protected remote.

### 为什么软件包爱好者会关心

tofuenv is useful in the same niche as rbenv, pyenv, and tfenv: it makes infrastructure repositories self-describing through a checked-in version file and lets contributors switch CLI versions without replacing the system package.

### 时间线

- 2023: OpenTofu was forked after the Terraform license change described in the OpenTofu manifesto.
- 2024-01-10: OpenTofu reached its first stable release.
- Current: tofuenv documents Homebrew, AUR, Puppet, manual clone, .opentofu-version, and environment-variable workflows.

### Related projects

- OpenTofu is the CLI managed by tofuenv.
- tfenv is the Terraform version manager that tofuenv cites as its inspiration.

### 来源

- <https://github.com/tofuutils/tofuenv#readme>
- <https://opentofu.org/blog/opentofu-is-going-ga/>
- <https://opentofu.org/manifesto/>
- <https://tofuutils.github.io/tofuenv>
- source_facts.package-manager


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## 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

- Unix: ./.opentofu-version, ~/.opentofu-version

## Credential files

- Unix: $tofuenv_NETRC_PATH

## Combined YAML source

View the package source record on GitHub. [combined/tofuenv.yml](https://github.com/mxcl/pkgdb/blob/main/combined/tofuenv.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
