skillfed

j2cli

Command-line interface to Jinja2 for templating in shell scripts.

j2cli v0.3.10 1.8M downloads/30d#3,578 on PyPI748
Permissive license BSD Abandoned released

What it is and what it does

j2cli is a command-line wrapper around Jinja2 that lets you render templates from the shell without writing Python code. It accepts a Jinja2 template file and data in JSON, YAML, INI, or environment variable format, then outputs the rendered result. The tool is particularly useful in Docker and shell scripting contexts where you need to generate configuration files dynamically from structured data or environment variables.

The package depends only on jinja2 and optionally pyyaml for YAML support. It supports custom Jinja2 filters, tests, and environment customization through Python hook files. However, the project has been unmaintained since 2019 and its repository is now archived—the maintainer explicitly recommends using one of several actively maintained forks instead.

Use it for:

  • Generate nginx or Apache configuration files from JSON/YAML templates in Docker containers at startup.
  • Render application config files from environment variables in CI/CD pipelines without shell variable expansion.
  • Template shell scripts or systemd unit files with data from structured config files.
  • Batch-generate multiple configuration variants from a single template and different data sources.
  • Inject secrets or runtime values into configuration templates using environment variables or data files.

Worth the install?

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

j2cli is a command-line tool that renders Jinja2 templates using data from JSON, YAML, INI files, or environment variables, designed for use in shell scripts and Docker environments.

No. While j2cli works and has low install friction, it is unmaintained since 2019 with an archived repository. The project's own documentation recommends using actively maintained forks (jinjanator, jinja2-cli, or jj2cli) instead. Install one of those alternatives unless you have a specific reason to use this exact version.

Install

j2cli on PyPI

pip

pip install j2cli

uv

uv add j2cli

poetry

poetry add j2cli

Installing j2cli

Before you install

Installation is straightforward with low friction—a single wheel dependency on jinja2. However, the project is abandoned as of 2019 with no active maintenance, and the repository is archived. The description explicitly recommends actively maintained forks instead.

License in practice

Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions, though you should verify the exact BSD variant in the source.

Quickstart

pip install j2cli

# Render template with JSON data:
j2 -f json config.j2 data.json > config.conf

# Or render using environment variables:
export HOSTNAME=localhost
j2 config.j2

Verify before relying

  • Whether the archived codebase has known security issues or compatibility problems with modern Python versions beyond what OSV reports.
  • Whether the recommended forks (jinjanator, jinja2-cli, jj2cli) are true drop-in replacements or require workflow changes.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — jinja2
Maintenance abandoned — 2,625 days since the last release
Last repo commit (repository archived)
First released
Downloads 1,766,060/month — #3,578 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: j2cli-0.3.10-py2.py3-none-any.whl

Keywords: Jinja2, templating, command-line, CLI

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development

Tags

jinja2 command line templatingtemplate rendering shell scriptsjson yaml ini templating clienvironment variable templatingdocker configuration templatingjinja2 cli tooltemplate to config file
cli-tooltemplate-engineabandoned

More Software Development packages