gunny-cli

Crates.iogunny-cli
lib.rsgunny-cli
version0.3.0
created_at2025-08-10 21:45:23.460163+00
updated_at2025-08-24 10:30:24.911595+00
descriptionA CLI application for rendering static text content from templates.
homepage
repositoryhttps://github.com/gunnyworks/gunny
max_upload_size
id1789330
size44,026
Thane Thomson (thanethomson)

documentation

README

Gunny

GitHub Actions Workflow Status Crates.io Version Crates.io License

Fast, simple text-based content generation from templates.

Usage

Inline templating and variable substitution

# 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

Supplying templates from a file

echo 'Hello {{name}}!' > ./template.hbs
gunny --template-file template.hbs -v name=Michael
# Hello Michael!

Piping templates through stdin

echo 'Hello {{name}}!' | gunny -v name=Michael --stdin template
# Hello Michael!

Supplying variables from a file

At present only JSON files are supported.

echo '{"name": "Michael"}' ./vars.json
gunny -t 'Hello {{name}}!' --variable-file vars.json

Supplying variables via stdin

At present only JSON-formatted data is supported.

echo '{"name": "Michael"}' | gunny -t 'Hello {{name}}!'

Templates

At present, only the Handlebars template engine is supported. In future, more template engines will be supported.

License

Licensed under either of

at your option.

Commit count: 32

cargo fmt