macOS
brew install hcl2jsonlocal Homebrew formula metadata
sudo port install hcl2jsonMacPorts ports tree · textproc/hcl2json/Portfile · source: api.github.com
brew
Convert HCL2 to JSON. Version 0.6.9 via Homebrew; verified from local package data.
install
brew install hcl2jsonlocal Homebrew formula metadata
sudo port install hcl2jsonMacPorts ports tree · textproc/hcl2json/Portfile · source: api.github.com
nix profile install nixpkgs#hcl2jsonnixpkgs package indexes · pkgs/by-name/hc/hcl2json/package.nix · source: api.github.com
overview
Convert HCL2 to JSON
history
hcl2json is a small Go command-line converter for turning HashiCorp Configuration Language version 2 input into JSON. Its niche is not general Terraform evaluation; it is a bridge for scripts and non-Go programs that need to inspect HCL-shaped configuration without embedding a full HCL-aware application.
The repository was created in July 2019 and framed itself around HCL2 conversion at a time when HCL was becoming the shared configuration substrate for Terraform and other HashiCorp-style tools. The README says the tool was created because there were few direct schemaless converters, while later HashiCorp HCL tooling such as hcldec offered a more specification-driven path.
Adoption stayed in the small-utility lane: Homebrew, MacPorts, Nix, prebuilt GitHub release binaries, Docker images, and tool-version-manager installs made it easy to drop into shell pipelines. The project matters most where HCL is data to inspect or transform rather than configuration to execute.
Typical use is piping an HCL file or stdin through hcl2json and redirecting JSON output for downstream tools. The README also documents a simplify mode and an HCL pack-format mode, while warning that some HCL constructs cannot be converted with exact semantic equivalence.
Package maintainers care about hcl2json because it is a single-purpose, Go-built CLI with no runtime service, no credentials, and obvious test fixtures: feed HCL in, compare JSON out. It fills the awkward gap between plain text processing and linking a whole HCL application stack.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
hcl2json | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/tmccombs/hcl2json
install metadata
| Package key | brew:hcl2json |
|---|---|
| Version | 0.6.9 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/hcl2json |
| Homepage | https://github.com/tmccombs/hcl2json |
| Repository | https://github.com/tmccombs/hcl2json |
| Upstream docs | https://github.com/tmccombs/hcl2json#readme |
| License | Apache-2.0 |
| Source archive | https://github.com/tmccombs/hcl2json/archive/refs/tags/v0.6.9.tar.gz |
| Build dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | hcl2json |
| 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 |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
hcl2json
nix profile install nixpkgs#hcl2jsonhcl2json
sudo port install hcl2jsonsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.