id = "minijinja-cli"
name = "MiniJinja CLI"
homepage = "https://github.com/mitsuhiko/minijinja"
description = "A command line executable that uses MiniJinja to render Jinja2 templates directly from the command line to stdout."
executables = ["minijinja-cli"]
[dotfiles]
paths = ["~/.minijinja.toml"]
secret = []
[commands]
format = 1
label = "Render a template"
description = "Render a Jinja2 template with variables from a data file or -D definitions. Syntax overrides, fuel limits and completion generation are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "readme"
kind = "manual"
url = "https://github.com/mitsuhiko/minijinja/blob/main/minijinja-cli/README.md"
revision = "main 2026-10"
evidence = """minijinja-cli my-template.j2 data.json
- `[TEMPLATE_FILE]`:
- `[DATA_FILE]`:
When data is read from `stdin`, `--format` must be specified as auto detection
You can use `--select` to make a section be implied:
minijinja-cli template.j2 input.ini --select default
minijinja-cli template.j2 -D name=World -D count:=3
minijinja-cli -t "Hello {{ name }}" -D name=World
echo '{"name": "World"}' | minijinja-cli -f json template.j2 -
minijinja-cli --env -E "ENV.HOME or ENV.USERPROFILE"
minijinja-cli --repl -D name=World
Including of templates can be disabled for security reasons with `--no-include`.
an alternative path can be supplied with the `--config-file` command line argument"""
[[commands.field]]
id = "template"
label = "Template file"
type = "path"
path = { kind = "file", role = "input" }
position = 0
sources = ["readme"]
[[commands.field]]
id = "data"
label = "Data file"
type = "path"
path = { kind = "file", role = "input" }
position = 1
sources = ["readme"]
[[commands.field]]
id = "template_string"
label = "Template string"
description = "Render this string instead of a template file."
type = "string"
option = ["-t"]
sources = ["readme"]
[[commands.field]]
id = "define"
label = "Define variable"
description = "name=value for a string, name:=value for a typed value."
type = "string"
option = ["-D"]
multiple = true
sources = ["readme"]
[[commands.field]]
id = "format"
label = "Data format"
type = "string"
option = ["--format", "-f"]
suggestions = [{ value = "json", label = "JSON" }, { value = "yaml", label = "YAML" }, { value = "toml", label = "TOML" }, { value = "cbor", label = "CBOR" }, { value = "querystring", label = "Query string" }, { value = "ini", label = "INI" }]
sources = ["readme"]
[[commands.field]]
id = "select"
label = "Select sub-section"
type = "string"
option = ["--select"]
sources = ["readme"]
[[commands.field]]
id = "env"
label = "Expose environment as ENV"
type = "boolean"
option = ["--env"]
sources = ["readme"]
[[commands.field]]
id = "expr"
label = "Evaluate expression"
type = "string"
option = ["-E"]
sources = ["readme"]
[[commands.field]]
id = "no_include"
label = "Disable includes"
type = "boolean"
option = ["--no-include"]
sources = ["readme"]
[[commands.field]]
id = "repl"
label = "Interactive REPL"
type = "boolean"
option = ["--repl"]
sources = ["readme"]
[[commands.task]]
id = "render"
label = "Render template with data file"
fields = ["template", "data", "select", "format"]
required = ["template"]
[[commands.task]]
id = "define"
label = "Render template with -D variables"
fields = ["template", "define"]
required = ["template", "define"]
[[commands.task]]
id = "expr"
label = "Evaluate an expression"
fields = ["expr", "env", "define"]
required = ["expr"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["template", "data", "define", "template_string", "expr"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["format", "select", "env", "no_include", "repl"]