Skip to content

haggishunk/hclfmt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HclFmt :: Revivified

This project is a fork from the original fatih/hclfmt . Please see that project for reference.

HclFmt is meant to be a very simple tool for use in text editors to keep your .hcl files squared away to the latest of hashicorp's standards.

Notable differences between the original project and this iteration is the sourcing of the hclparse and hclwrite packages from the hashicorp/hcl2 codebase. Some recent developments in hcl were not captured in the hcl/printer package of hashicorp/hcl.

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/haggishunk/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 -w flag to directly overwrite your file:

$ hclfmt -w 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

About

Format and prettify HCL files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%