Skip to content
ml0renz0Public

About

SHell TempLating

Resources

Stars

12 stars

Watchers

0 watching

Forks

Latest commit

 

History

126 Commits

Folders and files

Repository files navigation

shtpl — SHell TemPLating

A compact Jinja-inspired template-to-Bash compiler for trusted templates. Supports nested conditionals and loops, Bash expansions, static validation, and execution with legacy stdin compatibility.

CLI

shtpl < template.tpl
shtpl -i template.tpl -o rendered.txt
shtpl --check -i template.tpl
shtpl --compile -i template.tpl -o generated.sh
shtpl -i template.tpl --vars-file config.vars --var NAME=override
shtpl --help
shtpl --version

Use a single dash (-) for standard input or output. Output files are staged and replaced only after success. With --check, stdout is always empty and --output is invalid. With --compile, Bash code is generated without executing any template expressions. Default rendering executes Bash expressions; never run untrusted templates.

Installation

install -m 755 shtpl "$HOME/.local/bin/shtpl"

Requires Bash 4.4+ and GNU coreutils. See language and variables, compiler reference, automated releases, changelog, and original sample template.

About

SHell TempLating

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages