A command-line editor for HCL (HashiCorp Configuration Language) that enables token-based editing and automation of HCL2 files.
hcledit is a command-line editor for HCL (HashiCorp Configuration Language) files. It enables programmatic manipulation of HCL2 configurations through a suite of editing operations, allowing users to read, modify, and write HCL content via stdin/stdout or in-place updates. It solves the problem of automating changes to HCL files while preserving comments and structure.
Developers and DevOps engineers working with HCL-based configurations, particularly those using Terraform or other HashiCorp tools, who need to automate refactoring, updates, or bulk edits of HCL files.
Developers choose hcledit for its token-based editing that maintains comments, its schemaless design that works with any HCL2 file, and its CLI-friendly interface that integrates seamlessly into automation pipelines without requiring external dependencies.
A command line editor for HCL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Reads from stdin and writes to stdout, enabling easy piping and integration into shell scripts, as shown in the usage examples where commands are chained with cat.
Uses token-based editing to update HCL files without losing comments, maintaining original structure and readability, which is highlighted as a key feature for automation scripts.
No dependency on specific HCL application binaries or schemas, allowing generic manipulation of any HCL2 file, as stated in the philosophy prioritizing usability over strictness.
Supports a wide range of attribute and block operations like append, get, move, replace, remove, and set, covering most editing needs demonstrated in the README examples.
Explicitly does not support HCL1, restricting its use in legacy systems or projects with older HashiCorp tooling, as noted in the features section.
The schemaless approach lacks syntax or schema validation, potentially leading to errors if users are not careful, since it focuses on editing rather than correctness checks.
Admits it doesn't aim for generic query tools, so complex data extraction or analysis beyond basic get and list operations is not supported, as mentioned in the philosophy.