skillfed

jinja2-cli

The CLI for Jinja2

jinja2-cli v1.0.1 1.7M downloads/30d#3,658 on PyPI608
Permissive license Copyright (c) 2017-2026, Matt Robenolt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) Active released

What it is and what it does

jinja2-cli is a command-line wrapper around the Jinja2 templating engine that lets you render templates from the shell, reading data from files or standard input. It accepts multiple data formats (JSON, INI, ENV, querystring, TOML, and optional YAML/XML/JSON5 via extras) and supports inline variable definition, custom Jinja2 extensions, and custom filter modules. This makes it useful for generating configuration files, documentation, or any text output driven by structured data, without writing Python code.

The tool is designed for shell scripting and DevOps workflows—you can pipe data directly from curl, jq, or other CLI tools into a template, or read from files. It supports full control over the Jinja2 environment and can load custom filters from Python modules, including Ansible's filter library. The package is actively maintained, supports Python 3.8 through 3.12, and has no known vulnerabilities.

Use it for:

  • Generate configuration files (nginx, Docker, CloudFormation) from JSON or YAML data in CI/CD pipelines
  • Render documentation or reports by combining templates with data fetched from APIs or databases
  • Transform structured data (JSON, TOML) into text output using Jinja2 filters and logic from the command line
  • Build shell scripts that template output without embedding Python or shell templating logic
  • Extend template rendering with custom filters by loading your own Python filter modules

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A command-line interface for Jinja2 templating that renders templates with data from files or stdin, supporting multiple input formats including JSON, TOML, YAML, and XML.

Yes. It is a lightweight, actively maintained tool with low install friction, permissive licensing, no security vulnerabilities, and a clear use case for anyone templating text from the shell. Install it if you need to render Jinja2 templates from the command line or in scripts without writing Python code.

Install

jinja2-cli on PyPI

pip

pip install jinja2-cli

uv

uv add jinja2-cli

poetry

poetry add jinja2-cli

Installing jinja2-cli

Before you install

Low friction install with a single runtime dependency on jinja2. Actively maintained with recent releases and a stable repository.

License in practice

BSD License (permissive) allows use in commercial and private projects with minimal restrictions—retain copyright notice and disclaimer.

Quickstart

$ pip install jinja2-cli
$ jinja2 template.j2 data.json
$ curl -s http://api.example.com | jinja2 template.j2

Requires Python 3.8 or later; TOML format support requires Python 3.11+

Verify before relying

  • Whether custom filter modules can be loaded from arbitrary paths or only from installed packages
  • Performance characteristics with large data files or complex templates
  • Exact behavior when template or data file is malformed or missing

Package facts

License Copyright (c) 2017-2026, Matt Robenolt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — jinja2
Maintenance actively maintained — 131 days since the last release
Last repo commit
First released
Downloads 1,679,960/month — #3,658 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jinja2_cli-1.0.1-py3-none-any.whl

License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

jinja2 command line tooltemplate rendering clijson to template clijinja2 stdin templatingdata-driven template cliyaml template renderingjinja2 command line
cli-tooltemplatingdevops

More Utilities packages