hcledit

Command-line editor for HCL files with structured editing capabilities

brewmacoslinux
Try with needOr install directly
Source

About

Command-line editor for HCL

Commands

hcledit

Examples

Edit a specific attribute in an HCL file$ hcledit attribute set 'resource.aws_instance.example.ami' 'ami-12345678' main.tf
Read and display a value from HCL file$ hcledit attribute get 'variable.region.default' terraform.tfvars
Transform and output HCL file in JSON format$ hcledit format -json input.hcl