| Crates.io | rustpl |
| lib.rs | rustpl |
| version | 0.1.1 |
| created_at | 2026-01-14 08:45:39.116621+00 |
| updated_at | 2026-01-14 08:45:39.116621+00 |
| description | Template rendering cli tool |
| homepage | |
| repository | https://github.com/klebed/rustpl |
| max_upload_size | |
| id | 2042438 |
| size | 40,037 |
Template compiler written in π¦π¦π¦ Rust, so it's blazinglyπ₯π₯π₯ fast πππ and memory safe! It may use args, env and json files as input sets of keys/values.
It may be used as generator for:
It uses Tera template engine, which allows to use nesting/inheritance of templates for better complex workloads.
Example usage:
rustpl --template samples/main.tpl --template samples/header.tpl\
--set key=value --render main=/path/filename.txt
{# main.tpl #}
{% include "header" %}
You should see value of **key** here: {{ key }}
{# header.tpl #}
Hello, rustacean!
This is rustpl output!
This would produce following output in /path/filename.txt :
Hello, rustacean!
This is rustpl output!
You should see value of **key** here: value
For more advanced guidance on template format, read Tera documentation here: https://keats.github.io/tera/docs/
Full CLI arguments description:
#rustpl --help
Usage: rustpl [OPTIONS] --render <TEMPLATE=OUTPUT> --template <TEMPLATE_FILE>
Options:
-r, --render <TEMPLATE=OUTPUT> Sets the name of the template to render
-t, --template <TEMPLATE_FILE> Specifies the template file to use
-d, --template-dir <DIR> Specifies the directory containing templates
-s, --set <KEY=VALUE> Sets a variable for the document. You should escape quotes and doublequotes unless you're passing just a string
-j, --values <FILE> Path to a JSON file containing values
-E, --import-env [<PREFIX>] Import environment variables (optionally filtered by PREFIX, e.g., 'APP_'). WARNING: May expose secrets!
-v, --verbose Enable verbose logging (debug level)
-h, --help Print help
-V, --version Print version