mustach(1)

πŸ“¦ version 1.2.10, in alpine 3.24

πŸ’… 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 πŸ˜­πŸ’–



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