hclfmt is a command to format and prettify HCL (HashiCorp configuration language) files.
I didn't write hclfmt. It was written by Fatih Arslan.
There are two modes.
- Overwrite
${PWD}/job.nomad
with formatted output:
docker run --rm -v ${PWD}/job.nomad:/src/job.nomad unidario/hclfmt:latest -w job.nomad
- Print formatted output of
${PWD}/job.nomad
to stdout:
docker run --rm -v ${PWD}/job.nomad:/src/job.nomad unidario/hclfmt:latest job.nomad
git clone https://github.com/unidario/hclfmt-docker.git
cd hclfmt-docker
docker build -t hclfmt:latest .