Use the template standard library

Updated Sep 02, 2026

Netsuke registers focused path, collection, command, network, and time helpers alongside MiniJinja's built-ins. The library covers path and collection filters, file tests, clocks and durations, host commands, executable discovery, environment variables, globbing, and policy-controlled network retrieval.

See the template standard-library guide for every helper's signature, defaults, purity, platform caveats, and executable examples. Host-observing helpers belong only in trusted manifests: Netsuke bounds command and network output, but does not sandbox template evaluation.

When a Boolean is interpolated into a string field, Netsuke renders it as lowercase true or false. For example, this writes true to status.txt:

netsuke_version: "1.0.0"

vars:
  enabled: true

targets:
  - name: status.txt
    command: "printf '%s\\n' '{{ enabled }}' > {{ outs }}"

The now(offset=...) helper accepts Z or z for UTC and signed ISO 8601 offsets whose absolute hour component is below 24. Offsets such as +24:00, -24:00, and larger absolute hour values are rejected as invalid.

One helper deserves a note here because its result depends on the host's environment. path | expanduser expands a leading ~ against the home directory, resolved from HOME then USERPROFILE on POSIX hosts, and from HOME, USERPROFILE, the HOMEDRIVE/HOMEPATH pair, then HOMESHARE on Windows. The Windows pair counts only when both halves are non-empty; an incomplete pair falls through to HOMESHARE. Named-user forms such as ~alice are unsupported, and when no home directory resolves at all, the filter fails rather than passing the ~ through silently.