# pantor/inja

A Template Engine for Modern C++

Repository: https://github.com/pantor/inja
Canonical: https://ross.abutalabs.com/products/inja
Homepage: https://pantor.github.io/inja/
Language: C++
License: MIT
License Family: permissive
Topics: template, template-engine, header-only, jinja, string-template, inja, json
Last push: 2026-08-18T06:26:06+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 21, longevity 100
- inputs: {"age_days": 3308, "days_push": 15, "days_rel": 319, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1962, forks 251 (observed 2026-08-28T04:05:59.613747+00:00)

## What it is
Inja is a header-only template engine for modern C++, loosely inspired by Python's Jinja. It renders text templates with variables, loops, conditions, includes, and callbacks using nlohmann/json as its data source.

## Use cases
- render jinja-style templates in C++
- generate HTML or text from JSON data in C++
- embed a lightweight template engine in a C++ application
- generate code or config files from templates
- string templating without heavy dependencies

## When to choose
- you need a Jinja-like template engine in C++
- you want a header-only library with a single JSON dependency
- you need variables, loops, conditions, and includes in text templates

## When to avoid
- you need full Jinja2 compatibility or Python ecosystem features
- you need web-server-side rendering with async or streaming
- your project is not C++ or cannot use nlohmann/json

## Facets
- artifact type: library
- maturity: stable
- function: templating, parser, serialization
- domain: developer-tools, web-development
- platform: cpp, cross-platform, cli
- tags: header-only, jinja2, nlohmann-json, string-templating, modern-cpp, cpp

## Member repositories
- pantor/inja (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.613747+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:35.970902+00:00, confidence not recorded.
  - readme: https://github.com/pantor/inja (fetched 2026-08-28T04:05:59.613747+00:00, sha ed90f89a73da)
  - homepage: https://pantor.github.io/inja/ (fetched 2026-08-29T10:45:28.201481+00:00, sha 8cf5d9536866)
- Data as of 2026-08-30T08:39:29.467469+00:00.
