Getting started with Mirrow
Mirrow is a command-line compiler that turns ergonomic .mirrow source
into production-ready SVG. The reference on the left catalogues every element
Mirrow understands, but you can experience the workflow in seconds with a single
command.
One-command quickstart
Run Mirrow directly with npx, pointing it at your input file
and the SVG you want it to produce:
npx mirrow -i file.mirrow -o file.svg
This downloads the latest CLI, compiles file.mirrow, and writes
the output to file.svg. Swap in any paths you like. Mirrow will
create the SVG if it does not exist, or overwrite it with fresh output.
Zero-to-output example
Want to see the full flow? Drop into a fresh directory and paste this
snippet. It writes a sample .mirrow file, compiles it, and leaves the
generated SVG beside it:
cat <<'EOF' > demo.mirrow
svg {
box: (0, 0, 200, 200)
circle {
at: (100, 100)
r: 40
fill: "hotpink"
animate {
prop: "r"
from: 40
to: 60
dur: 2s
repeat: indefinite
}
}
}
EOF
npx mirrow -i demo.mirrow -o demo.svg
Open demo.svg in any vector viewer to watch the animated circle, and
rerun the command whenever you tweak demo.mirrow.
Dive into the element index
Start with a
to explore the attributes Mirrow expands for each SVG element, then
continue through the catalog using the navigation.