Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatih/hclfmt
Format and prettify HCL files
https://github.com/fatih/hclfmt
formatter hcl hclfmt prettifier
Last synced: 1 day ago
JSON representation
Format and prettify HCL files
- Host: GitHub
- URL: https://github.com/fatih/hclfmt
- Owner: fatih
- License: bsd-3-clause
- Archived: true
- Created: 2015-10-25T16:35:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-10T23:41:33.000Z (about 6 years ago)
- Last Synced: 2024-08-04T01:10:13.700Z (4 months ago)
- Topics: formatter, hcl, hclfmt, prettifier
- Language: Go
- Size: 7.81 KB
- Stars: 229
- Watchers: 7
- Forks: 51
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Archived project. No maintenance.
This project is not maintained anymore and is archived. Feel free to fork and
make your own changes if needed. For more detail read my blog post: [Taking an indefinite sabbatical from my projects](https://arslan.io/2018/10/09/taking-an-indefinite-sabbatical-from-my-projects/)Thanks to everyone for their valuable feedback and contributions.
# hclfmt [![Build Status](http://img.shields.io/travis/fatih/hclfmt.svg?style=flat-square)](https://travis-ci.org/fatih/hclfmt)
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:
```bash
go get github.com/fatih/hclfmt
```## Editor integration
* [vim-hclfmt plugin](https://github.com/fatih/vim-hclfmt)
* [atom-hclfmt](https://atom.io/packages/hclfmt)## Usage
The usage is similar to `gofmt`. If you pass a file it prints the formatted
output to std output:```bash
$ hclfmt config.hcl
```You can pass the `-w` flag to directly overwrite your file:
```bash
$ hclfmt -w config.hcl
```If no arguments are passed, it excepts the input from standard input.
## License
The BSD 3-Clause License - see
[`LICENSE`](https://github.com/fatih/hclfmt/blob/master/LICENSE) for more
details