# Install hcledit with Homebrew, Nix

Command-line editor for HCL. Version 0.2.18 via Homebrew; verified 2026-05-05.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install hcledit
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

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

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

## Package facts

- **Package key:** brew:hcledit
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/hcledit>
- **Version:** 0.2.18
- **Source summary:** Command-line editor for HCL
- **Homepage:** <https://github.com/minamijoyo/hcledit>
- **Repository:** <https://github.com/minamijoyo/hcledit>
- **Upstream docs:** <https://github.com/minamijoyo/hcledit#readme>
- **License:** MIT
- **Source archive:** <https://github.com/minamijoyo/hcledit/archive/refs/tags/v0.2.18.tar.gz>
- **Last updated:** 2026-05-05T18:52:16Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- hcledit (cli)
- hcledit (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.2.18
- Package-manager updated: 2026-05-05
- Local data: ok
- Upstream repository: https://github.com/minamijoyo/hcledit
- Upstream latest detected: v0.2.18 (current)
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- 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


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [editorconfig](https://www.automicvault.com/pkg/brew/editorconfig/) - Shares av.db curated category or tags: cli, configuration, developer-tools, editor.
- [hcl2json](https://www.automicvault.com/pkg/brew/hcl2json/) - Shares av.db curated category or tags: cli, configuration, developer-tools, hcl, terraform.
- [json2hcl](https://www.automicvault.com/pkg/brew/json2hcl/) - Shares av.db curated category or tags: cli, configuration, developer-tools, hcl.
- [butane](https://www.automicvault.com/pkg/brew/butane/) - Shares av.db curated category or tags: cli, configuration, developer-tools.
- [config-file-validator](https://www.automicvault.com/pkg/brew/config-file-validator/) - Shares av.db curated category or tags: cli, configuration, developer-tools.
- [dhall-bash](https://www.automicvault.com/pkg/brew/dhall-bash/) - Shares av.db curated category or tags: cli, configuration, developer-tools.
- [dhall-json](https://www.automicvault.com/pkg/brew/dhall-json/) - Shares av.db curated category or tags: cli, configuration, developer-tools.
- [dynaconf](https://www.automicvault.com/pkg/brew/dynaconf/) - Shares av.db curated category or tags: cli, configuration, developer-tools.
- [terraform-lsp](https://www.automicvault.com/pkg/brew/terraform-lsp/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, editor, hcl.

## Combined YAML source

View the package source record on GitHub. [combined/hcledit.yml](https://github.com/automic-vault/db/blob/main/combined/hcledit.yml)


## Sources

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