{"library":"nunjucks-cli","title":"nunjucks-cli","description":"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.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install nunjucks-cli"],"cli":{"name":"nunjucks","version":null}},"imports":["npx nunjucks <file> [context] [options]"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# Create a sample template\necho 'Hello {{ name }}!' > hello.tpl\n# Create a sample data file\necho '{\"name\": \"World\"}' > data.json\n# Render the template to HTML\nnpx nunjucks hello.tpl data.json\n# Output: hello.html with content 'Hello World!'\n# Watch mode for auto-recompilation\nnpx nunjucks **/*.tpl --watch","lang":"typescript","description":"Shows basic rendering with a template and JSON data, then watching all templates for changes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}