Sintax
A fast, dependency-aware template engine with a composable modifier pipeline.
Transform any value with a single expression. Chain modifiers, resolve variable dependencies automatically, and handle complex data structures - without writing transformation logic by hand.
{{ response | from:'json' | key:'items' | filter:'status','active' | first | key:'name' | default:'unknown' }}Pipe syntax
Chain 40+ modifiers to transform values in a single expression. Text, collections, dates, paths, and more.
Dependency resolution
Variables reference each other. Sintax figures out the order and resolves everything correctly - automatically.
Conditional logic
Branch output with if/else blocks or inline ternary expressions.
Use cases
Workflow engines, API response transformation, config generation, and dynamic formatting.
The pipe syntax
Values flow left to right through a chain of modifiers. Each modifier takes the output of the previous step as its input:
{{ title | trim | lower | slug }}
→ "my-post-title"
{{ body | shorten:160 }}
→ "First 160 characters of the body..."
{{ csv_line | split:',' | join:' | ' }}
→ "value1 | value2 | value3"{{ users | filter:'active',true | sort:'name' | first | key:'email' }}
→ "alice@example.com"
{{ tags | has:'featured' ? 'highlighted' : 'standard' }}
→ "highlighted"
{{ products | map:'sku' }}
→ { "SKU-001": {...}, "SKU-002": {...} }{{ file_path | dirname }}
→ "/usr/local/share"
{{ file_path | filename | ext-trim }}
→ "config"
{{ asset | ext-prepend:'min' }}
→ "app.min.js"{{ now | format:'YYYY-MM-DD' }}
→ "2026-04-16"
{{ now | format:'D, d M Y' }}
→ "Thursday, 16 Apr 2026"
{{ created_at | format:'H:i' }}
→ "14:30"Variables that reference each other
Unlike most template engines, sintax doesn't require a pre-resolved context. Define your variables in any order - sintax works out the dependencies and resolves them correctly.
env: "production"
prefix: "{{ env | upper }}"
db_url: "{{ prefix }}_database"
label: "Connected to {{ db_url }}"label → "Connected to PRODUCTION_database"Circular references are detected before resolution starts and reported as a clear error.
Safe fallbacks
The default modifier short-circuits an entire pipeline when a value is missing, making it easy to build expressions that degrade gracefully:
{{ config | from:'json' | key:'timeout' | default:30 }}
{{ user | key:'profile.avatar' | default:'https://example.com/default.png' }}
{{ tags | filter:'featured' | first | default:'general' }}default catches both missing variables and modifier errors - so a broken upstream value won't crash the whole expression.
Conditional output
{{ if is_admin }}Full access{{ else }}Limited access{{ /if }}
{{ count | gt:0 ? count : 'none' }}The eq, gt, gte, and not modifiers return booleans you can use directly in conditions or ternary expressions.
Modifier categories
Text
trim, upper, lower, replace, slug, shorten, split, join, concat, reverse, and more
Collections
filter, find, sort, first, last, key, map, wrap, merge, has, is
Boolean
eq, gt, gte, not - produce true/false for conditionals and ternaries
Convert
json, from - serialize to JSON or parse JSON/YAML strings back into values
Utilities
default, format, length, line-numbers
File System
dirname, filename, ext, ext-dot, ext-trim, ext-prepend
How is this guide?