macOS
brew install hcl2jsonlocal Homebrew formula metadata
sudo port install hcl2jsonMacPorts ports tree · textproc/hcl2json/Portfile · 来源: api.github.com
安装
brew install hcl2jsonlocal Homebrew formula metadata
sudo port install hcl2jsonMacPorts ports tree · textproc/hcl2json/Portfile · 来源: api.github.com
nix profile install nixpkgs#hcl2jsonnixpkgs package indexes · pkgs/by-name/hc/hcl2json/package.nix · 来源: api.github.com
概览
Convert HCL2 to JSON
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
hcl2json | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/tmccombs/hcl2json
安装元数据
| 软件包键 | brew:hcl2json |
|---|---|
| 版本 | 0.6.9 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/hcl2json |
| 主页 | https://github.com/tmccombs/hcl2json |
| 仓库 | https://github.com/tmccombs/hcl2json |
| 上游文档 | https://github.com/tmccombs/hcl2json#readme |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/tmccombs/hcl2json/archive/refs/tags/v0.6.9.tar.gz |
| 最后更新 | 2026-07-25T20:56:30-04:00 |
| Pulse | updated |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
hcl2json
nix profile install nixpkgs#hcl2jsonhcl2json
sudo port install hcl2json来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.