# 使用 Homebrew, apk, MacPorts, Nix, zypper 安装 tfupdate

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

## 安装

```sh
sudo av install brew:tfupdate
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tfupdate
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tfupdate
```

  证据: MacPorts ports tree: sysutils/tfupdate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add tfupdate
```

  证据: Alpine Linux edge package indexes: tfupdate from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#tfupdate
```

  证据: nixpkgs package indexes: pkgs/by-name/tf/tfupdate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install tfupdate
```

  证据: openSUSE Tumbleweed package metadata: tfupdate from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:tfupdate
- **软件包管理器:** Homebrew
- **版本:** 0.10.2
- **来源摘要:** Update version constraints in your Terraform configurations
- **主页:** <https://github.com/minamijoyo/tfupdate>
- **仓库:** <https://github.com/minamijoyo/tfupdate>
- **最后更新:** 2026-07-26T00:50:40+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- tfupdate (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

tfupdate is a CLI for updating version constraints in Terraform and OpenTofu configurations. Its README documents support for Terraform core, OpenTofu core, providers, modules, dependency lock files, recursive updates, and release lookups from GitHub, GitLab, the Terraform Registry, and the OpenTofu Registry.

### 项目历史

The README explains the design motivation: Terraform estates are often split across many directories, while best practice is to pin versions of core, providers, and modules. tfupdate was written to parse configuration and update version constraints across those scattered files.

The tool later grew beyond simple constraint editing. The README documents `release` subcommands for checking versions, `lock` support for updating `.terraform.lock.hcl` without the Terraform or OpenTofu CLI, and OpenTofu registry support through `TFREGISTRY_BASE_URL`.

### 采用历史

The README documents installation through Homebrew, MacPorts, compiled releases, Go install, and Docker. The input metadata also records apk, Homebrew, MacPorts, Nix, and zypper packaging.

The README explicitly suggests integrating tfupdate with CI or a scheduler to check releases daily and create pull requests automatically, and links a CircleCI example and orb.

### 使用方式

Package users run subcommands such as `tfupdate terraform`, `tfupdate opentofu`, `tfupdate provider`, `tfupdate module`, `tfupdate release`, and `tfupdate lock`. The recursive flag lets teams update many directories in one pass, which is the core package-nerd use case.

For lock files, tfupdate can download provider packages, calculate hashes, and cache calculated values in memory, which the README calls out as a performance advantage when updating multiple directories recursively.

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

tfupdate is a dependency-maintenance tool for infrastructure code. It fills the same niche as language package updaters, but for Terraform/OpenTofu version constraints, provider locks, and module versions.

Its support across several Unix package managers makes it useful in automated developer environments where Terraform version bumps are handled by scheduled jobs rather than manual edits.

### 时间线

- 2024-08-01: The GitHub releases page lists tfupdate v0.8.4.
- 2025-05-03: The GitHub releases page lists tfupdate v0.9.0.
- 2026-05-05: The GitHub releases page lists tfupdate v0.9.4.
- 2026: The input metadata records tfupdate packaging in apk, Homebrew, MacPorts, Nix, and zypper.

### Related projects

- tfupdate works with Terraform, OpenTofu, GitHub and GitLab releases, Terraform Registry modules and providers, OpenTofu Registry data, CircleCI automation, and `.terraform.lock.hcl`.

### 来源

- <https://github.com/minamijoyo/tfupdate README>
- <https://github.com/minamijoyo/tfupdate/releases>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - tfupdate: normalized package name match | nixpkgs package indexes: pkgs/by-name/tf/tfupdate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - tfupdate - 0.8.2-r17: normalized package name match | Alpine Linux edge package indexes: tfupdate from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Update version constraints in your Terraform configurations | https://github.com/minamijoyo/tfupdate
- apk - tfupdate-doc - 0.8.2-r17: normalized package name match | Alpine Linux edge package indexes: tfupdate-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Update version constraints in your Terraform configurations (documentation) | https://github.com/minamijoyo/tfupdate
- zypper - tfupdate - 0.10.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: tfupdate from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Update version constraints in your Terraform configurations | https://github.com/minamijoyo/tfupdate
- MacPorts - tfupdate: normalized package name match | MacPorts ports tree: sysutils/tfupdate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
