Cinegram for VS CodeArchitecture diagrams that play. Write a Mermaid diagram, describe what
happens on it in a
A static diagram shows you the boxes. It cannot show you the order — which call happens first, what is still holding a lock when the timeout fires, which three of the eleven arrows a single request actually touches. Cinegram adds a timeline to a diagram you already know how to write. Animated
|
| To export | You need |
|---|---|
| GIF | Chrome or Chromium, for capturing frames. The encoder is built in. |
| mp4 or webm | Chrome or Chromium, plus ffmpeg. |
Both are found on your PATH, or named by cinegram.chromePath and
cinegram.ffmpegPath. Every frame is a separate headless screenshot — which is
what makes a recording look the same on any machine, and also what makes
cinegram.record.fps the setting that decides how long an export takes.
Settings
| Setting | Default | Meaning |
|---|---|---|
cinegram.path |
"" |
Path to the cinegram binary. Empty uses the bundled one. |
cinegram.blockLanguages |
["dgm", "cinegram"] |
Fence languages rendered as diagrams. |
cinegram.compileTimeout |
5000 |
Milliseconds a block may take to compile. |
cinegram.record.fps |
12 |
Frames per second to export at, and so what an export costs. |
cinegram.record.width |
1280 |
Viewport width to record at, rounded up to even. |
cinegram.record.height |
720 |
Viewport height to record at, rounded up to even. |
cinegram.chromePath |
"" |
The browser that captures frames, as CINEGRAM_CHROME. |
cinegram.ffmpegPath |
"" |
ffmpeg, as CINEGRAM_FFMPEG. Only mp4 and webm need it. |
cinegram.path exists for anyone working on Cinegram itself. Left empty, the
extension uses the bundled binary, then a Bazel build in an open workspace
(bazel-bin/cmd/cinegram/…), then cinegram on your PATH.
Known limitations
- Exporting Markdown to HTML or PDF does not include the diagrams. Exporters run the markdown-it plugin but load none of the preview scripts, so they see an empty placeholder.
- VS Code for Web is unsupported, because rendering spawns a native binary.
- Markdown cells in notebooks need a separate
notebookRenderercontribution, which this does not have yet.
Learn more
The Cinegram repository documents the
whole language — scenarios, storyboards, variants, focus, deep links,
clickable drill-down between diagrams, presenter mode and the cinegram CLI —
and carries a folder of
worked examples.
Found a bug, or want a diagram type that is not here yet? Open an issue.
