Lini is a small text-to-diagram language: flowcharts, mindmaps, charts, sequence diagrams, ER schemas, engineering drawings, floor plans and circuit schematics from plain text, compiled to clean, themeable SVG. Open…
1 comment
A small one looks like this:
{ |svc::box| { fill: --teal-wash; stroke: --teal-ink } }
|group| "Services" [ |svc#api| "API"; |svc#auth| "Auth" ]
|svc#db| "Postgres"
api -> db "read"
auth -> db "write"
{ } is style, [ ] is children, and naming two nodes draws a link. lini routes it around whatever is in the way.The SVG has no JS in it. Every colour is a CSS variable with a light-dark() pair, so one file follows the reader's dark mode, and one line of CSS on the page recolours all the diagrams on it.
It's also fast and deterministic, about 2 ms for a typical figure and byte-identical output every run, so the SVGs diff cleanly in CI. You don't need Node or a headless browser to render anything.
The playground on the site is the same compiler built to wasm. There's also cargo install lini, plugins for mdBook, remark (Docusaurus/MDX) and Astro, and extensions for VS Code and Zed. Repo: https://github.com/monfa-red/lini
Would really like to hear what breaks, or what you'd want it to draw that it can't
Thanks
Read the full thread on Hacker News →
Related stories
- Hacker News · 1 points · 1 day ago
- Hacker News · 1 points · 6 days ago
- Hacker News · 1 points · 10 days ago
- Show HN: Text alerts when Codex resets are announcedresetalerts.comHacker News · 3 points · 1 day ago
- Hacker News · 1 points · 7 days ago
- Show HN: Morse Code Translator – real-time text-to-Morse with audiomorsetranslator.meHacker News · 2 points · 11 days ago