macOS
brew install json2hcllocal Homebrew formula metadata
安装
brew install json2hcllocal Homebrew formula metadata
nix profile install nixpkgs#json2hclnixpkgs package indexes · pkgs/by-name/js/json2hcl/package.nix · 来源: api.github.com
概览
Convert JSON to HCL, and vice versa
历史
json2hcl is a small Go command-line converter for moving data between JSON and HashiCorp Configuration Language. Its niche is the Terraform-era need to translate machine-friendly JSON into a more readable HCL form without building a larger configuration system.
Kevin van Zonneveld published json2hcl in September 2016 around a workflow for an internal tool named Frey. The README says the authors wanted to store infrastructure recipes as HCL after converting from machine-readable JSON, YAML, or TOML, and it explicitly notes that the tool used existing HashiCorp libraries rather than inventing a parser.
The project soon added reverse conversion with the `-reverse` flag, exposing hcl2json behavior through the same executable. By June 25, 2025, the GitHub repository was archived; its README states that the original author no longer used it, while leaving the code available for forks.
Adoption appears to have been modest but durable in package-manager terms: the tool was packaged by Homebrew and Nix, and the repository accumulated hundreds of stars and forks before archival. Its presence in Homebrew reflects the small-CLI pattern where a narrow converter remains useful even after upstream development slows.
The canonical usage is Unix-pipeline oriented: feed JSON on standard input and receive HCL on standard output, or pass `-reverse` to convert HCL back to JSON. The README examples focus on Terraform-like `.tf.json` input and redirection to `.tf` files.
json2hcl is interesting because it captures a short period when HCL was becoming a preferred human-edited configuration language around HashiCorp tools, while JSON remained the common interchange format. For package collectors, it is a tiny bridge utility whose package-manager value is convenience rather than ecosystem size.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
json2hcl | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/kvz/json2hcl
安装元数据
| 软件包键 | brew:json2hcl |
|---|---|
| 版本 | 0.2.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/json2hcl |
| 主页 | https://github.com/kvz/json2hcl |
| 仓库 | https://github.com/kvz/json2hcl |
| 上游文档 | https://github.com/kvz/json2hcl#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/kvz/json2hcl/archive/refs/tags/v0.2.0.tar.gz |
| 最后更新 | 2026-05-19T07:48:50-04:00 |
| Pulse | updated |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | json2hcl |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | yes |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
json2hcl
nix profile install nixpkgs#json2hcl来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.