Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Format and prettify HCL files
Go
Latest commit d4ef031 @fatih Add .travis.yml
Failed to load latest commit information.
.travis.yml Add .travis.yml
LICENSE BSD 3-Clause license
README.md README.md: change wording
main.go hclfmt: fix returning errors

README.md

hclfmt Build Status

hclfmt is a command to format and prettify HCL files. It's similar to the popular gofmt command. Hook it with your favourite editor or use it from the command line.

Install

If you have Go installed just do:

go get github.com/fatih/hclfmt

Editor integration

Usage

The usage is similar to gofmt. If you pass a file it prints the formatted output to std output:

$ hclfmt config.hcl

You can pass the -write flag to directly overwrite your file:

$ hclfmt -write config.hcl

If no arguments are passed, it excepts the input from standard input.

License

The BSD 3-Clause License - see LICENSE for more details

Something went wrong with that request. Please try again.