Fast, simple text-based content generation from templates.
# Inline template variable substitution with output to stdout. Useful when
# subtituting either templates or variable values from environment variables.
gunny -t 'Hello {{name}}!' -v name=Michael
# Hello Michael!
# Inline template with multiple variable substitution.
gunny -t 'Hello {{name}}! Today is {{date}}' -v name=Michael -v date="$(date)"
# Hello Michael! Today is 2025-08-04
echo 'Hello {{name}}!' > ./template.hbs
gunny --template-file template.hbs -v name=Michael
# Hello Michael!
echo 'Hello {{name}}!' | gunny -v name=Michael --stdin template
# Hello Michael!
At present only JSON files are supported.
echo '{"name": "Michael"}' ./vars.json
gunny -t 'Hello {{name}}!' --variable-file vars.json
At present only JSON-formatted data is supported.
echo '{"name": "Michael"}' | gunny -t 'Hello {{name}}!'
At present, only the Handlebars template engine is supported. In future, more template engines will be supported.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.