Skip to main content

tmpl-cli

Render Jinja2 templates from the command line with JSON, YAML, environment variables, or inline values.

Install

pip install tmpl-cli

# With YAML support:
pip install tmpl-cli[yaml]

Usage

# Render a template file with a data file
tmpl render template.conf -d config.json

# Inline template with --set
tmpl render "Hello {{name}}!" --set name=World

# Multiple data sources (later overrides earlier)
tmpl render app.conf -d defaults.json -d overrides.json --set debug=true

# Use environment variables
tmpl render deploy.yaml --env
tmpl render deploy.yaml --env-prefix APP_

# List variables in a template
tmpl vars template.conf

# Validate syntax
tmpl validate template.conf

# Check template + data completeness
tmpl check template.conf -d data.json --strict

Commands

Command Description
render Render a template (file, inline string, or stdin with -)
vars List undeclared variables in a template
validate Check template syntax
check Validate template and verify all variables are provided

Data Sources (priority low→high)

  1. -d / --data files (JSON or YAML, repeatable)
  2. --env (all env vars) or --env-prefix PREFIX (filtered, prefix stripped)
  3. -s / --set key=value (highest priority, repeatable)

Values in --set are auto-parsed as JSON when possible (--set count=5 → int, --set items='["a","b"]' → list).

For AI Agents

See SKILL.md for agent-optimized documentation.

License

MIT

Release files for tmpl-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tmpl-cli 0.1.0
File Size Uploaded
tmpl_cli-0.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tmpl-cli 0.1.0
File Interpreter ABI Platform
tmpl_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / tmpl_cli-0.1.0.tar.gz

Download URL tmpl_cli-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6b07f146a3fb9d8b1b199c6ebea2d4ceac3a0ee09be4ff84a3d5b8a95be44898
BLAKE2b-256 checksum
How to use checksums
ae3b0ec65b78eb27d35e48bdcaa3c628082b3e72bb477d074fc58fd249a4ed7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / tmpl_cli-0.1.0-py3-none-any.whl

Download URL tmpl_cli-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbe58a90ccc6f511d6f65c9edb9a56dbececcabfe043102a607b0999c797c0ba
BLAKE2b-256 checksum
How to use checksums
379b5b8d71b687260b1d18de35757a22935bb557aacf97f21489cb54cf633111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page