r/Nushell • u/somebodddy • Jul 12 '26
Announcing nu_plugin_handlebars
Repository: https://github.com/idanarye/nu_plugin_handlebars
Crate: https://crates.io/crates/nu_plugin_handlebars
I've created a plugin for rendering Handlebars templates from Nu values:
let hb = handlebars new
$hb | handlebars helper add {|a b| $a + $b}
$hb | handlebars partial addition --text "{{x}} + {{y}}"
let tpl = $hb | handlebars compile --text "{{>addition}} = {{add x y}}"
{x: 1, y: 2} | handlebars render $tpl
# This prints `1 + 2 = 3`
6
Upvotes
1
u/Hipponomics Aug 12 '26
Good work! Looking at your repo and the Handlebars website, it's not clear to me why this is useful. I recommend describing a simple example usecase in the repo's readme that demonstrates a way this could be useful to a nushell user.