Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/apparentlymart/hcltemplate

CLI filter for rendering JSON objects using the HCL template language
https://github.com/apparentlymart/hcltemplate

Last synced: 2 months ago
JSON representation

CLI filter for rendering JSON objects using the HCL template language

Awesome Lists containing this project

README

        

# hcltemplate

`hcltemplate` is a filter program for transforming JSON objects into other
strings using the [HCL](https://hcl.readthedocs.io/) template language.

There are [precompiled releases](https://github.com/apparentlymart/hcltemplate/releases)
available for various platforms.

It expects to find a JSON object on its stdin and produces text on its stdout
using a template file given on the command line.

For example, given the following `input.json`:

```json
{
"name": "Jacqueline"
}
```

...and the following `template.tmpl`:

```
Hello ${name}
```

We can render the template with the JSON input like this:

```
$ ./hcltemplate template.tmpl