一覧へ戻る
mattrobenolt/jinja2-cli(新しいタブで開きます)
主要言語: Python
The CLI for Jinja2
- star 数
- 614
- watcher 数
- 11
- fork 数
- 197
- issue 数
- 14
- 最終更新
- 2026/08/12
主要言語: Python
The CLI for Jinja2
The CLI for Jinja2.
$ jinja2 template.j2 data.json
$ curl -s http://api.example.com | jinja2 template.j2
$ uv tool install jinja2-cli
$ pip install jinja2-cli
Built-in: JSON, INI, ENV, querystring, TOML (Python 3.11+)
Optional formats via extras:
$ pip install jinja2-cli[yaml]
$ pip install jinja2-cli[xml]
$ pip install jinja2-cli[hjson]
$ pip install jinja2-cli[json5]
-D key=valueRun jinja2 --help for all options, or see docs/ for full documentation.
Extend Jinja2 with your own filters or use Ansible's extensive filter library:
# Use custom filters $ jinja2 template.j2 data.json -F myfilters # Use Ansible filters $ jinja2 template.j2 data.json -F ansible.plugins.filter.core
Example filter module:
# myfilters.py def reverse(s): return s[::-1] def shout(s): return s.upper() + "!"
See docs/filters.md for complete documentation and examples.