Readable
No redundant code: classes and ids as .class and #id shorthands, no closing tags, and children in { } blocks.
A new, modern and fast way to write HTML with { } blocks instead of closing tags. Easy to read, quick to write, and with AI coding agent support for code generation.

nav.top {
a(href=/) Home
a(href=/docs :class={ active: onDocs }) Docs
button(@click=toggleTheme)= themeLabel
}<nav class="top">
<a href="/">Home</a>
<a href="/docs" :class="{ active: onDocs }">Docs</a>
<button @click="toggleTheme">{{ themeLabel }}</button>
</nav>With the advent of coding agents and a faster pace of development, I was thinking about a better format to replace HTML, without the issues other formats have (pug, for example). The main goal is to make it readable, so a human can quickly validate agent-generated code, and yet simple and explained for an agent to write and validate, with optimized token usage.
zamn compiles to plain HTML, so it works anywhere HTML does: a static page, an email template, or the <template> of a Vue component.
No redundant code: classes and ids as .class and #id shorthands, no closing tags, and children in { } blocks.
Written in Rust and run as WebAssembly, for top performance compared to parsers and tools in pure JavaScript.
Comes with a fine-tuned Claude Code skill, rules for any agent, llms.txt, and zamn --validate with hints agents act on. And thanks to clean syntax it consumes less input/output tokens.
<template lang="zamn"> with Vite, vue-tsc type checking, ESLint, Prettier and VS Code highlighting.
| Write | Get |
|---|---|
div, button, .card, #app | an element; without a tag it is implicitly a div |
a.link#home(href=/) Home | classes, ids and attributes follow the tag, text after a space |
a(href="/" target=_blank) | attributes; quote a value with spaces, commas or brackets |
input(disabled checked=false) | true or no value is a boolean attribute; false drops it |
style={fontSize: 12px} | style="font-size:12px;" |
:class={ active: on }, @click="go()" | bindings and events, as written; binded JS values like { ... } and [...] may omit quotes |
ul { li One } | children go in { }, the only way to nest |
li: a(href=/) Home | one child on the same line |
ul { li { b x } li { b y } } | blocks on one line |
| text, | | a statement of text; a bare | is one space |
|{ … } | text over several lines, line breaks kept, useful with pre or when writing inline template |
p Read #{a(href=/docs) the docs}. | an element inside text |
h1= title, h1 {{ title }} | {{ title }} for your framework |
\{, \} | escape braces in text |
script … /script | raw content, not parsed or escaped; same for style |
// note, /* … */ | comments, left out of the HTML |
//! note, /*! … */ | HTML comments |
doctype html | <!DOCTYPE html> |
article.post {
h2.title= post.title
p Read #{a(href=/docs) the docs} first.
ul.tags {
li(v-for="tag in post.tags" :key=tag)= tag
}
button(@click="like(post)" :disabled=busy) Like
}} that closes its block: p { b bold i italic } is one b with text "bold i italic". Put the next child on a new line, or after the }: p { b { | bold } i italic }.{ }, and let Prettier indent.title="Page title", v-for="(item, i) in items".#{b bold}.v-if, v-for, components.zamn --validate, then format with prettier --write.