# 使用 Homebrew, Nix 安装 hcledit

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

## 安装

```sh
sudo av install brew:hcledit
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hcledit
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#hcledit
```

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

## 软件包事实

- **软件包键:** brew:hcledit
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/hcledit>
- **版本:** 0.2.18
- **来源摘要:** Command-line editor for HCL
- **主页:** <https://github.com/minamijoyo/hcledit>
- **仓库:** <https://github.com/minamijoyo/hcledit>
- **许可证:** MIT
- **源码归档:** <https://github.com/minamijoyo/hcledit/archive/refs/tags/v0.2.18.tar.gz>
- **最后更新:** 2026-07-27T14:32:23+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- hcledit (cli)
- hcledit (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.2.18
- 管理器更新时间: 2026-07-27
- 本地数据: OK
- 上游仓库: https://github.com/minamijoyo/hcledit
- 检测到的最新版本: v0.2.18 (当前)
## 项目历史与用法

hcledit is a command-line editor for HCL2 files. It is aimed at automation-friendly edits of attributes, blocks, bodies, and formatting while preserving the token stream well enough to avoid discarding comments.

### 项目历史

The repository was created on January 1, 2020, after HCL2 had become the dominant syntax for Terraform-era infrastructure configuration. The README describes the tool as originally born for refactoring Terraform configurations, but deliberately schemaless so it is not bound to Terraform itself.

### 采用历史

The tool found a narrow audience among infrastructure engineers who needed repeatable HCL rewrites in shell scripts and CI tasks. Its distribution history is similarly compact: GitHub releases, a Homebrew tap/formula path, source builds with Go, and Nix packaging recorded in the batch input.

### 使用方式

hcledit reads from stdin or a file, writes to stdout or updates in place, and exposes subcommands for attribute get/set/move/remove, block listing and mutation, whole-body extraction, and formatting. Its value is token-based mutation rather than evaluation of a provider or Terraform module.

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

For package-manager users, hcledit is the HCL counterpart to focused text-structure tools such as jq or yq, but constrained to HCL syntax and Terraform-style refactoring chores. It is useful precisely because it avoids a dependency on a specific application's schema.

### 时间线

- 2020: GitHub repository created.
- 2020: alpha and v0.0.1 releases published.
- 2020: v0.1.0 release published after the early alpha series.
- 2021: v0.2.0 release published.

### Related projects

- HashiCorp HCL supplies the syntax and Go libraries behind HCL2-aware tooling.
- Terraform is the origin use case named by the README.
- hcl2json solves a neighboring conversion problem rather than in-place editing.

### 来源

- <https://api.github.com/repos/minamijoyo/hcledit>
- <https://api.github.com/repos/minamijoyo/hcledit/releases>
- <https://github.com/hashicorp/hcl>
- <https://github.com/minamijoyo/hcledit>


## 安全说明

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:** hcledit
- **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

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

- Nix - hcledit: normalized package name match | nixpkgs package indexes: pkgs/by-name/hc/hcledit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/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.
- [hcl2json](https://pkg.so/zh-hans/brew/hcl2json/) - Shares pkgdb curated category or tags: cli, developer-tools, hcl, terraform.
- [editorconfig](https://pkg.so/zh-hans/brew/editorconfig/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, editor.
- [k2tf](https://pkg.so/zh-hans/brew/k2tf/) - Shares pkgdb curated category or tags: cli, developer-tools, hcl, terraform.
- [tfk8s](https://pkg.so/zh-hans/brew/tfk8s/) - Shares pkgdb curated category or tags: cli, developer-tools, hcl, terraform.
- [terragrunt-atlantis-config](https://pkg.so/zh-hans/brew/terragrunt-atlantis-config/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, terraform.
- [terraform-lsp](https://pkg.so/zh-hans/brew/terraform-lsp/) - Shares pkgdb curated category or tags: cli, developer-tools, hcl, terraform.
- [json2hcl](https://pkg.so/zh-hans/brew/json2hcl/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, hcl.
- [neovim](https://pkg.so/zh-hans/brew/neovim/) - Shares pkgdb curated category or tags: cli, developer-tools, editor.

## Combined YAML source

View the package source record on GitHub. [combined/hcledit.yml](https://github.com/mxcl/pkgdb/blob/main/combined/hcledit.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
