Registry / devops / nunjucks-cli

nunjucks-cli

JSON →
library1.0.0jsnpmunverified

A CLI wrapper and file watcher for Nunjucks templates, enabling compilation of Nunjucks files to static HTML. Version 1.0.0, released as an initial stable version, works as a command-line tool for rendering templates with JSON data and watching for changes. Key differentiators: built-in watcher for automatic re-rendering, support for glob patterns, process.env injection as context, and sensible defaults like ignoring partials starting with underscore.

npm install nunjucks-cli
INSTALL
IMPORT
SIG · NUNJUCKS-CLI
N
nunjucks-cli
devopsjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nunjucks-cli
npx nunjucks <file> [context] [options]
npm install -g nunjucks-cli && nunjucks <file> [context] [options]
CLI tool, not a library. Use npx to avoid global install.

Shows basic rendering with a template and JSON data, then watching all templates for changes.

# Create a sample template echo 'Hello {{ name }}!' > hello.tpl # Create a sample data file echo '{"name": "World"}' > data.json # Render the template to HTML npx nunjucks hello.tpl data.json # Output: hello.html with content 'Hello World!' # Watch mode for auto-recompilation npx nunjucks **/*.tpl --watch
nunjucks --version
Debug
Known issues
gotchaTemplate files starting with underscore (_) are ignored by default
fix
Rename files without underscore or use a different tool if you need to compile underscore-prefixed templates.
affects: >=1.0.0
Errors
Common errors & fixes
nunjucks: command not found
Installed locally without global link or npx
fix
Use `npx nunjucks` or install globally with `npm i -g nunjucks-cli` then run `nunjucks`.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
nunjucksrequiredcore template engine
Agent activity
8 hits · last 30 days
node
8
Resources
nunjucks-cli — npm install nunjucks-cli · libregistry