Command-line tool¶
The revealer command manages presentations and the reveal.js engine they
embed. It is a hybrid CLI: explicit sub-commands, with interactive menus
(extension selection, presentation picker) where it helps.
Direct open¶
The fastest entry point: give revealer a .pres file (or a folder
containing one) with no sub-command, and it behaves as revealer serve —
build, open in the browser with live reload, editor
enabled:
revealer talk.pres # same as: revealer serve talk.pres
revealer ~/talks/MyTalk # a folder works too
Configuration¶
Revealer stores a small global configuration in
~/.config/revealer/config.toml (following the XDG base directory spec). Its
main role is to remember your presentations root — the folder where all your
presentations live.
It also keeps a short recents list: every presentation you load (via the
menu or revealer open) is remembered there, so it shows up in revealer list
and in the presentation picker even if it lives outside the root. (Discovery
under the root only scans its direct child folders, so decks nested deeper are
reached via Load / recents.)
Each presentation also carries a hidden .revealer.toml file recording the
reveal.js extensions it uses, the reveal.js version, and the commit pins of
its third-party plugins, so the engine can be rebuilt or updated
identically later (see
Recipes › Reproducible decks).
Commands¶
revealer root [PATH]¶
Set or display the presentations root folder.
revealer root ~/Science/Presentations # set
revealer root # show current value
revealer new NAME¶
Scaffold a new presentation under the root: a folder, a freshly downloaded
reveal.js engine with the chosen extensions, and a pre-filled NAME.pres
file. You are prompted to select the extensions interactively.
revealer new MyTalk
revealer new MyTalk --here # create in the current directory instead
revealer open [TARGET]¶
Load a presentation: build it, remember it in recents, and open the result in
your browser. TARGET may be a .pres file or its folder; omit it to pick from
the list (which includes a Load… browse entry).
revealer open ~/talks/MyTalk/MyTalk.pres # build + open in the browser
revealer open ~/talks/MyTalk # a folder works too
revealer open --no-show MyTalk.pres # build + remember only, no browser
revealer open # pick / browse interactively
revealer select¶
Interactively pick an existing presentation from the root and build it.
revealer list¶
Show a table of the presentations found in the root and their enabled extensions.
revealer plugins [TARGET]¶
Choose the extensions for a presentation (interactive checkbox), then download
any missing plugins, refresh index.html and rebuild. TARGET may be a
presentation folder or a .pres file; if omitted you are asked to pick one.
revealer update [TARGET]¶
Update the reveal.js engine of a presentation to the version pinned by Revealer, keeping its extensions.
revealer update MyTalk
revealer update MyTalk --force # re-download reveal.js from scratch
The --force flag is the recommended way to migrate older presentations to
the current reveal.js version and plugin set.
revealer build [TARGET]¶
Generate the HTML presentation from a .pres file. This is the command used by
the VS Code Run on save integration.
revealer check [TARGET]¶
Render the deck in headless Chrome and report what the build cannot see: content that overflows its box, lands off the slide, or is cropped through a figure. The build’s own warnings are parse-time only — a callout spilling onto the figure below it, a citation pushed past the bottom edge or a logo strip cut off by the window are all invisible to them.
$ revealer check talk.pres
Warning: slide 8/1 (Results) line 214: info box overflows its box by 38px
Warning: slide 12 (Setup) line 297: cover crops this media to 41% of one axis — use `contain`, or crop the source
2 finding(s) over 24 slides (1 crop, 1 overflow).
Findings use the parser’s Warning: format, so “zero warnings” comes to mean
the deck is presentable. Each names the slide the way revealer index does,
the source line, and the measured overflow in pixels.
Option |
Effect |
|---|---|
|
Exit with status 2 when anything is reported (for CI). |
|
Also report |
|
Ignore finding kinds, comma-separated: |
revealer build --check builds and then checks in one step. Add
data-rv-check="ignore" to a raw-HTML element to exclude it and its contents
(a deliberate bleed off the canvas, say).
The check needs a Chrome/Chromium binary, like PDF export. It renders every
slide with all fragments shown — the most crowded state a slide ever reaches —
and leaves the deck’s own talk.html untouched.
revealer index [TARGET]¶
List the deck’s slides with the indices reveal.js gives them — the numbers
you need to deep-link (talk.html#/8/1), to screenshot one slide, or to
say “slide 15” unambiguously:
$ revealer index talk.pres
0 17 >>> first: Stochastic Force Inference
1 20 === The dynamics of living systems…
1/1 35 --- How does it work?
- 107 --- Export to pdf (hidden)
2 123 %%% Extensions
The second column is the source line (file:line for included files).
Slides hidden with > visibility: hidden are listed without an index —
reveal.js drops them, so the slides after them shift up. --json prints
the same list as JSON.
revealer serve [TARGET]¶
Serve a presentation with rebuild-on-save and live browser reload. TARGET
may be a .pres file or its folder; --port / -p picks the port (default
8000, auto-incremented if busy) and --no-open skips launching the browser.
revealer serve MyTalk # build, open, watch
revealer serve MyTalk -p 9000 # explicit port
While the server runs, every save of the .pres (or of the deck’s media,
.bib, .svg files) rebuilds and reloads the browser in place, keeping the
current slide and fragment. Build errors appear as an overlay in the browser
— with an open in editor button (uses $REVEALER_EDITOR, VS Code’s code -g, or $EDITOR) — while the last good version keeps being served. The
server binds to 127.0.0.1 only and serves a separate <name>.dev.html
artifact, deleted on exit; the exported <name>.html is not touched.
The served presentation carries the browser editor’s toolbar (edit mode, undo/redo, fragment drawer, outline, media import, split view, save history, HTML/PDF export) — see The browser editor.
revealer pdf [TARGET]¶
Export a presentation to PDF, one page per slide with every fragment visible
(revealer export is the same command under another name). TARGET may be
a .pres file or its folder; --out / -o sets the output path (default:
next to the .pres).
revealer pdf MyTalk # -> MyTalk/MyTalk.pdf
revealer pdf MyTalk -o slides.pdf
The export drives a headless Chrome/Chromium (it must be installed, along with
the img2pdf command); each slide is captured at the presentation resolution
and the pages are assembled losslessly. This avoids the blank pages produced by
the stock reveal.js ?print-pdf route with Revealer’s fitted layout.
By default every slide becomes one page with all fragments shown. Set
> pdfSeparateFragments: true in the .pres settings block to get one page
per fragment state instead (the pre-fragment state, then each step), matching
what the audience sees during the talk.
How updating works¶
reveal.js and its plugins are not bundled inside the repository. Instead, Revealer keeps a pinned manifest of:
the reveal.js core release (which ships the official plugins:
markdown,highlight,notes,zoom,math,search);third-party plugins, with their source repository and pinned reference:
chalkboard,customcontrols,anything(from rajgoel/reveal.js-plugins) andembed-video(from ThomasWeinert/reveal-embed-video).
revealer new, revealer plugins and revealer update download exactly the
pinned versions and wire the selected extensions into index.html, so every
presentation is reproducible.