Guides
Check and deliver
Start a deck, measure it in a real browser, photograph it, and turn it into the file you hand over.
What the command line is for
A deck is plain HTML, so you can write one and present it without ever opening a terminal. The command line covers the three moments where that is not enough: starting a deck with its runtime already in place, finding out what is wrong with it before a room does, and producing the artefact you actually deliver · a single file, a PDF, or a set of pictures.
Two audiences need it. Authors reach for init at the start and for export or bundle at the end. Agents and CI jobs live on check and render, which are the only two commands that report what a deck looks like in a form a program can read.
Every command runs from an install, with no clone and no build step. The package declares bin.rikiki, so npx rikiki … works as soon as rikiki-deck is a dependency.
What each command needs
All of them need Node ^20.19.0 || >=22.12.0, the range the package declares under engines. Three of them need a browser, and two need a bundler. Both are optional peer dependencies: a deck that only loads the runtime never pays for them.
| Command | Beyond Node | Install line |
|---|---|---|
init | nothing else | · |
init --standalone | rolldown ^1.1.1 | npm i -D rolldown |
check | playwright ^1.60.0 | npm i -D playwright && npx playwright install chromium |
render | playwright ^1.60.0 | npm i -D playwright && npx playwright install chromium |
bundle | rolldown ^1.1.1 | npm i -D rolldown |
export | playwright ^1.60.0 | npm i -D playwright && npx playwright install chromium |
assemble | nothing else | · |
skills | nothing else | · |
A missing peer is reported as a sentence with the line that installs it, not as a stack trace.
init · start a deck
Writes a deck you can edit, plus the runtime it loads, next to it.
npx rikiki init index.html
# a single self-contained file instead of a source deck
npx rikiki init index.html --standalone --title "My talk"The default form produces index.html and copiesdist, tokens.css, themes andfonts into rikiki/ beside it. Serve that folder overhttp://; ES modules do not load from file://.
With --standalone you get one self-contained file instead, and the command exits non-zero if that file would still fetch anything at runtime. A second init on an existing name refuses to overwrite unless you pass --force.
| Flag | Effect |
|---|---|
--standalone | emit one self-contained file instead of a source deck |
--title "…" | deck title · defaults to the file name |
--theme rikiki|siliceum | starting theme · a source deck copies fonts/ either way, and under --standalone only siliceum has local fonts to inline (rikiki reads its typefaces from Google Fonts) |
--with-mermaid, --with-shiki | also carry the mermaid runtime or the Shiki highlighter |
--no-fonts | drop the fonts rather than inline them |
--force | overwrite a deck that is already there |
check · measure the deck
Loads the deck in a real browser, measures it, and reports each finding with a stable code, the slide it belongs to and the number that justifies it.
npx rikiki check index.html
# the same report as JSON on stdout, for a script or an agent
npx rikiki check index.html --jsonThe human report goes to stderr, one finding at a time, and ends with a count of errors and warnings.
! TEXT_TOO_SMALL · slide 4 (#pricing)
text renders at 15px · the back row will not read it
at deck-split#pricing > deck-md
try raise the size, or move the detail into deck-notes
index.html · 12 slide(s) · 0 error(s), 1 warning(s)Exit codes
| Code | Meaning |
|---|---|
0 | the deck was measured and no finding has error severity |
1 | the deck was measured and at least one finding is an error |
2 | the deck could not be read at all · the path is missing or is not a file |
The split matters to whoever calls the command: 1 says fix the deck, 2 says fix the call.
The JSON report
With --json, stdout carries the report and nothing else, so it pipes without stripping anything · including when the deck is broken. Notes stay on stderr. The report is versioned by a schema field and carries the deck name, the slide count, the thresholds that were applied, anerror and warning summary, the diagnostics, and anotChecked list naming what nobody looked at.
What it looks at
| Category | Codes |
|---|---|
| the deck never ran | RUNTIME_NOT_LOADED, NO_DECK_ROOT, NO_SLIDES, PAGE_ERROR, RESOURCE_MISSING |
| markup that renders as nothing | UNKNOWN_ELEMENT, STRAY_MARKUP, CONTENT_NOT_RENDERED, UNKNOWN_ATTRIBUTE, DUPLICATE_SLIDE_ID |
| what fits on the slide | CONTENT_CLIPPED, SLIDE_DENSE, SLIDE_TOP_HEAVY, TEXT_TOO_SMALL |
| diagram geometry | GRAPH_NODE_OUT_OF_BOUNDS, GRAPH_EDGE_CROSSES_NODE |
| the talk and what it pulls in | TALK_SHORTER_THAN_ANNOUNCED, EXTERNAL_DEPENDENCY |
SLIDE_TOP_HEAVY comes from a pixel pass that takes one screenshot per slide and measures where the ink sits.--no-visual skips that pass; the report then says the pixels were not measured. --width and --height set the canvas the deck is measured against.
What it does not test
The report is a set of measurements, not a verdict on the deck, and it says so in its own notChecked list:
- accessibility · no contrast, focus order or screen-reader check is run.
- revealed steps · only the opening state of each slide is measured.
- wording, facts and figures · nothing here reads the content.
- other viewports · the deck is measured at its own canvas size.
- text inside a diagram · an SVG scales by its viewBox, which is not measured.
render · one picture per slide
Photographs the deck so that something without eyes on the screen, a review thread or an agent, can look at it.
npx rikiki render index.html
# a chosen few, each revealed state, into a directory you name
npx rikiki render index.html --slides 2,pricing --steps --out shots/The pictures land in index.shots/ unless --outnames another directory. Beside them sit a gallery page,index.html, that opens offline from a file manager, and amanifest.json that ties every picture back to the slide it came from: its index, its id, its tag, its title and its file name. That manifest is what turns "the third picture" into an element you can edit.
| Flag | Effect |
|---|---|
--out dir | where the pictures go · defaults to the deck name plus .shots |
--slides a,b | which slides · 1-based numbers or slide ids, in deck order · an unknown name is an error |
--steps | one picture per revealed state · without it a stepped slide is caught in its opening state |
--width, --height | canvas size in pixels |
bundle · one file to send
Folds an existing deck, its theme, its runtime and its images into a single HTML file with no external reference.
npx rikiki bundle index.html
# an explicit name, or - to write the file to stdout
npx rikiki bundle index.html talk.htmlWithout a second argument the file lands next to the deck asindex.bundle.html; - writes it to stdout instead. The bundle is curated to the components the deck uses and to the icons it draws, and the HTML and CSS stay readable so the result is still editable. If anything in the produced file would still be fetched at runtime, the command says what and exits non-zero · a bundle that fetches is a broken deliverable, not a warning.
| Flag | Effect |
|---|---|
--with-mermaid, --with-shiki | inline the mermaid runtime or the Shiki highlighter · needed when the deck uses them |
--all | carry every component instead of the ones the deck uses |
--include a,b | force-include components that only appear from JS |
--no-fonts | drop the fonts and fall back to system ones |
--minify-css, --minify-html | trade readability for size |
--no-minify-js | keep the framework JS readable |
export · a PDF, one page per slide
Prints the deck for the people who asked for the slides afterwards.
npx rikiki export index.html
# choose the file name
npx rikiki export index.html --output talk.pdfThe file lands as index.pdf unless --output (or-o) names another one. Page geometry and page breaks come from the deck's own print stylesheet, backgrounds are printed, and the PDF is tagged with one outline entry per slide so a reader can jump around. Anything the deck could not load is listed before the file is announced, because a page that printed without an image is worth saying out loud.
assemble · one deck from many files
Joins ordered partials into the single deck file the rest of the commands expect.
npx rikiki assemble deck.config.jsThe config lists a title, a theme href, a runtime href and the ordered parts; .html parts are inlined as they are and .mdparts split into slides. The output is a normal deck, socheck, render, bundle andexport all take it. A second argument names the output file, and- sends it to stdout. SeeMulti-file decks for the manifest and the partial formats.
skills · the agent skills
Copies the skills shipped with the package into a project, so a coding agent discovers them on its own.
npx rikiki skillsThe installed skills are rikiki-deck,rikiki-theme and rikiki-debug. They land in.claude/skills/ unless --dir names another location, an existing skill is left alone unless you pass--force, and the command reports what it wrote.
Next
- Theming · the tokens behind
--theme, and how to write a theme of your own. - Multi-file decks · the manifest
assemblereads.