mustach(1)
π
mustach(1) β General Commands Manual, but make it fashion π
hey bestie π«Ά welcome to the mustach(1) page β yes, the General Commands Manual page for the Mustache templating command line engine. we're reading it together like a group chat, and it's iconic. no cap.
πΈ NAME πΈ
mustach β Mustache templating command line engine β¨
that's the name, that's the vibe, periodt.
β¨ SYNOPSIS β¨
okay so the shape is literally:
mustach [-s|--strict] JSON TEMPLATE...
π¦ DESCRIPTION π¦
the whole job: instantiate the TEMPLATE files accordingly to the JSON file. that's it, that's the mission π
if one of the given files is -, the standard input is used. yes, the humble dash is main character energy.
option --strict make mustach fail if a tag is not found. so bestie, if a tag is missing, it is not gonna be chill about it β it fails. that's the option, fr fr.
π₯ EXAMPLE π₯
a typical Mustache template file: temp.must
Hello {{name}}
You have just won {{value}} dollars!
{{#in_ca}}
Well, {{taxed_value}} dollars, after taxes.
{{/in_ca}}
given a JSON file: inst.json
{
"name": "Chris",
"value": 10000,
"taxed_value": 6000,
"in_ca": true
}
calling the command mustach inst.json temp.must will produce the following output:
Hello Chris
You have just won 10000 dollars!
Well, 6000.0 dollars, after taxes.
and that's the glow-up, bestie ππ
π LINK π
- site of mustach, the C implementation:
https://gitlab.com/jobol/mustach - Mustache format:
http://mustache.github.io/mustache.5.html - main site for Mustache:
http://mustache.github.io/ - JSON:
https://www.json.org/
bye bestie π β the footer vibes on this mustach(1) page are dated 2024-01-06 (and there's no extra source/version line), so that's the cute sign-off at the very end. mwah π
π¦ where this page comes from
- alpine 3.24: mustach-doc 1.2.10-r0 Β· 0BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms