# 使用 Homebrew, MacPorts 安装 tfmv

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

## 安装

```sh
sudo av install brew:tfmv
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tfmv
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tfmv
```

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

## 软件包事实

- **软件包键:** brew:tfmv
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tfmv>
- **版本:** 1.0.0
- **来源摘要:** CLI to rename Terraform resources and generate moved blocks
- **主页:** <https://github.com/suzuki-shunsuke/tfmv>
- **仓库:** <https://github.com/suzuki-shunsuke/tfmv>
- **许可证:** MIT
- **源码归档:** <https://github.com/suzuki-shunsuke/tfmv/archive/refs/tags/v1.0.0.tar.gz>
- **最后更新:** 2026-07-26T00:50:39+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tfmv (cli)
- tfmv (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.0.0
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/suzuki-shunsuke/tfmv
- 检测到的最新版本: v1.0.0 (当前)
## 项目历史与用法

tfmv is a Terraform refactoring CLI by suzuki-shunsuke for renaming resources, data sources, and modules while generating Terraform moved blocks. Its README frames the tool around the practical problem of changing Terraform block names without losing state continuity.

### 项目历史

The project emerged in the Terraform 1.x era after moved blocks became the standard way to record address changes in configuration. The README demonstrates a focused workflow: scan Terraform files, rename matching block labels, update references, and emit moved blocks, with no need to run terraform init for the shown rename operation.

### 采用历史

Adoption appears specialized rather than broad: Homebrew lists tfmv as a bottled formula at version 1.0.0 and reports low-volume installs. That pattern fits a maintenance utility used when teams perform Terraform module or naming cleanups rather than a daily Terraform wrapper.

### 使用方式

tfmv is used from a Terraform working tree with replacement rules, regular expressions, or Jsonnet-driven rename logic. The README shows examples such as replacing hyphens with underscores, filtering addresses with include/exclude regular expressions, writing moved blocks to moved.tf or another file, and recursively scanning Terraform files while ignoring directories such as .git and .terraform.

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

For package-manager users, tfmv is a small example of the Terraform ecosystem spawning single-purpose CLIs around state-safe refactoring. Its Homebrew and MacPorts packaging make it convenient for infrastructure engineers who want a one-command tool during large address-renaming migrations.

### 时间线

- 2025: GitHub tags list v0.2.8 in July and v1.0.0 in December.
- 2026: Homebrew formula metadata lists stable version 1.0.0 with bottled builds.

### Related projects

- Terraform moved blocks
- Terraform CLI
- Jsonnet

### 来源

- <https://formulae.brew.sh/api/formula/tfmv.json>
- <https://github.com/suzuki-shunsuke/tfmv#readme>
- <https://github.com/suzuki-shunsuke/tfmv/tags>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tfmv
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- MacPorts - tfmv: normalized package name match | MacPorts ports tree: sysutils/tfmv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [tfclean](https://pkg.so/zh-hans/brew/tfclean/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, moved-blocks, terraform.
- [tfautomv](https://pkg.so/zh-hans/brew/tfautomv/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, moved-blocks, terraform.
- [tfenv](https://pkg.so/zh-hans/brew/tfenv/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terraform-docs](https://pkg.so/zh-hans/brew/terraform-docs/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tfmigrate](https://pkg.so/zh-hans/brew/tfmigrate/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tf-summarize](https://pkg.so/zh-hans/brew/tf-summarize/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tfupdate](https://pkg.so/zh-hans/brew/tfupdate/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [iam-policy-json-to-terraform](https://pkg.so/zh-hans/brew/iam-policy-json-to-terraform/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tfocus](https://pkg.so/zh-hans/brew/tfocus/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, infrastructure.

## Combined YAML source

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


## 来源

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