CLI reference
The kadal-deck command comes with @kadal/deck, so every deck already has it. Run it from the
deck’s folder with npx kadal-deck <command>pnpm exec kadal-deck <command>yarn kadal-deck <command>bunx kadal-deck <command>, or through the scripts the starter defines:
| Script | Runs |
|---|---|
npm run devpnpm devyarn devbun run dev |
kadal-deck dev |
npm run buildpnpm buildyarn buildbun run build |
kadal-deck build |
npm run exportpnpm exportyarn exportbun run export |
kadal-deck export |
npm run publish:deckpnpm publish:deckyarn publish:deckbun run publish:deck |
kadal-deck publish |
To have the command outside a deck too, install it with npm, Homebrew or Scoop (Package managers).
npx kadal-deck --helppnpm exec kadal-deck --helpyarn kadal-deck --helpbunx kadal-deck --help prints the options of the version you have installed, and
npx kadal-deck --versionpnpm exec kadal-deck --versionyarn kadal-deck --versionbunx kadal-deck --version the version. This page describes 0.4.2.
Commands at a glance
Section titled “Commands at a glance”| Command | What it does |
|---|---|
new |
a deck from the starter, or a theme or addon package |
import slidev |
a new deck converted from a Slidev project, with a report |
import reveal |
a new deck converted from a reveal.js deck, with a report |
theme eject |
copies the deck’s theme into the deck so you can change it |
dev |
the deck with live reload; the phone remote; a tunnel |
check |
lints the deck |
format |
formats deck.mdx and the files it includes |
info |
prints the reference: components, layouts, settings, keys… |
build |
a static site in dist/ for any host |
serve |
serves a build the way a static host would |
ci |
writes a host’s deploy files |
relay |
the phone remote’s relay for a build on a static host |
screenshot |
PNG pictures of slides |
export |
PDF, PNG, PPTX (pictures or editable) and Markdown |
narrate |
bakes the speaker notes into spoken audio |
login, logout, whoami |
the account on deck.kadal.cc (or another host) |
publish |
builds the deck, uploads what changed, prints its address |
thumbnail |
takes the dashboard’s picture of a live deck again, without publishing |
media |
finds icons, emoji, stickers, GIFs, memes and Kadal media, with ready MDX |
mcp |
a Model Context Protocol server for AI agents |
Options every command takes
Section titled “Options every command takes”| Option | Meaning |
|---|---|
--dir <path>, -C <path> |
run in another folder, as if you had cd’d there (except theme eject, below) |
--json |
print exactly one JSON object on stdout; progress and messages go to stderr. All commands but dev, build and mcp |
--help, -h |
the usage |
Flags take their value as --flag value or --flag=value. A switch is turned off with --no-
(--no-install, --no-pdf). An unknown flag is a usage error (exit code 2), except on dev and
build, which pass the flags they don’t know to Vite.
@kadal/create-deck
Section titled “@kadal/create-deck”npm create @kadal/deck@latest my-talkpnpm create @kadal/deck my-talkyarn create @kadal/deck my-talkbun create @kadal/deck my-talkpnpm create @kadal/deck, yarn create @kadal/deck and bun create @kadal/deck work the same. It
copies the starter into my-talk/ and prints the next steps; it does not install anything, so run
npm installpnpm installyarn installbun install (or your package manager’s) next. Without a folder name it asks for one in a
terminal and uses my-deck otherwise.
| Option | Meaning |
|---|---|
--title <title> |
the deck’s title |
--theme <name> |
a theme package instead, in kadal-theme-<name>/ (see Writing a theme) |
--addon <name> |
an addon package instead |
With npm, flags for the package go after --: npm create @kadal/deck@latest -- --theme aurorapnpm create @kadal/deck -- --theme aurorayarn create @kadal/deck -- --theme aurorabun create @kadal/deck -- --theme aurora.
npx kadal-deck new my-talk --title "Tides of Chennai"npx kadal-deck new my-talk --pm pnpm --ci github-pagesnpx kadal-deck new --theme aurora # ./kadal-theme-auroranpx kadal-deck new --addon qr my-addon # ./my-addonpnpm exec kadal-deck new my-talk --title "Tides of Chennai"pnpm exec kadal-deck new my-talk --pm pnpm --ci github-pagespnpm exec kadal-deck new --theme aurora # ./kadal-theme-aurorapnpm exec kadal-deck new --addon qr my-addon # ./my-addonyarn kadal-deck new my-talk --title "Tides of Chennai"yarn kadal-deck new my-talk --pm pnpm --ci github-pagesyarn kadal-deck new --theme aurora # ./kadal-theme-aurorayarn kadal-deck new --addon qr my-addon # ./my-addonbunx kadal-deck new my-talk --title "Tides of Chennai"bunx kadal-deck new my-talk --pm pnpm --ci github-pagesbunx kadal-deck new --theme aurora # ./kadal-theme-aurorabunx kadal-deck new --addon qr my-addon # ./my-addonMakes a deck from the starter and, unlike npm create, installs its packages. It never asks a
question, which makes it the one to use in scripts and agents.
| Option | Meaning |
|---|---|
--title <title> |
the deck’s title |
--no-install |
copy only; don’t install |
--pm npm|pnpm|yarn|bun |
the package manager to install with (default: the one running the command) |
--ci <host[,host]> |
also write a host’s deploy files, as ci does |
--yes, -y |
accepted for scripts; new asks nothing anyway |
--theme <name> [dir] |
a theme package instead: the theme contract’s package.json, a stylesheet with every token in light and dark, a layout, a layer, a README and a preview deck |
--addon <name> [dir] |
an addon package instead |
--install |
with --theme or --addon: install the package’s dependencies too |
new refuses a folder that isn’t empty (exit code 2).
import slidev
Section titled “import slidev”npx kadal-deck import slidev ./my-old-talk # writes ./my-old-talk-kadalnpx kadal-deck import slidev slides.md --out talk --installpnpm exec kadal-deck import slidev ./my-old-talk # writes ./my-old-talk-kadalpnpm exec kadal-deck import slidev slides.md --out talk --installyarn kadal-deck import slidev ./my-old-talk # writes ./my-old-talk-kadalyarn kadal-deck import slidev slides.md --out talk --installbunx kadal-deck import slidev ./my-old-talk # writes ./my-old-talk-kadalbunx kadal-deck import slidev slides.md --out talk --installConverts a Slidev project (its folder, or its slides.md) into a new Kadal Deck folder, writes
IMPORT-REPORT.md there with whatever did not carry over, and runs check on the result.
Nothing in the source project is changed, installed or run. The full story is in
Migrate a Slidev deck.
| Option | Meaning |
|---|---|
--out <dir>, -o <dir> |
where the new deck goes (default <folder>-kadal) |
--force |
write into a folder that is not empty |
--install |
install the new deck’s packages afterwards |
--pm npm|pnpm|yarn|bun |
with --install, the package manager |
import reveal
Section titled “import reveal”npx kadal-deck import reveal ./my-reveal-talk # writes ./my-reveal-talk-kadalnpx kadal-deck import reveal index.html --out talk --installpnpm exec kadal-deck import reveal ./my-reveal-talk # writes ./my-reveal-talk-kadalpnpm exec kadal-deck import reveal index.html --out talk --installyarn kadal-deck import reveal ./my-reveal-talk # writes ./my-reveal-talk-kadalyarn kadal-deck import reveal index.html --out talk --installbunx kadal-deck import reveal ./my-reveal-talk # writes ./my-reveal-talk-kadalbunx kadal-deck import reveal index.html --out talk --installConverts a reveal.js deck (its folder, or its index.html) into a new Kadal Deck folder the same
way: sections and vertical stacks, fragments, backgrounds, notes, auto-animate, code steps and
data-markdown sections, in theme: reveal with the reveal.js theme the page linked. Local images go
into public/ and the page’s CSS into src/reveal.css;
IMPORT-REPORT.md lists what did not carry over, and check runs on the result. No
script in the page is run. It takes the same options as import slidev. The full story is in
Coming from reveal.js.
theme eject
Section titled “theme eject”npx kadal-deck theme eject # the deck's theme, into ./themenpx kadal-deck theme eject --theme seriph # another theme than the headmatter'snpx kadal-deck theme eject --dir ./my-theme --forcenpx kadal-deck theme eject -C talks/launch # a deck in another folderpnpm exec kadal-deck theme eject # the deck's theme, into ./themepnpm exec kadal-deck theme eject --theme seriph # another theme than the headmatter'spnpm exec kadal-deck theme eject --dir ./my-theme --forcepnpm exec kadal-deck theme eject -C talks/launch # a deck in another folderyarn kadal-deck theme eject # the deck's theme, into ./themeyarn kadal-deck theme eject --theme seriph # another theme than the headmatter'syarn kadal-deck theme eject --dir ./my-theme --forceyarn kadal-deck theme eject -C talks/launch # a deck in another folderbunx kadal-deck theme eject # the deck's theme, into ./themebunx kadal-deck theme eject --theme seriph # another theme than the headmatter'sbunx kadal-deck theme eject --dir ./my-theme --forcebunx kadal-deck theme eject -C talks/launch # a deck in another folderCopies the deck’s theme (a package, or a built-in as a package-shaped folder) into the deck and
points the headmatter at the copy (theme: ./theme). It also removes src/main.tsx’s import of a
built-in’s stylesheet, so the two don’t fight. See
Themes and backgrounds.
| Option | Meaning |
|---|---|
--dir <path> |
where the copy goes (default ./theme) |
--theme <name> |
eject this theme instead of the headmatter’s |
--force |
replace a folder that is already there |
-C <deck>, --deck <deck> |
the deck to work on (here --dir is the target, not the deck) |
npx kadal-deck dev # http://localhost:5173/npx kadal-deck dev --host # also on your network, for a phonenpx kadal-deck dev --host --https # a self-signed certificate: the phone's motion sensors worknpx kadal-deck dev --tunnel # an https address on the internet, password-guardednpx kadal-deck dev --remote s3cret # on the network; presenter pages need the passwordnpx kadal-deck dev --port 3030 --open # any Vite flagpnpm exec kadal-deck dev # http://localhost:5173/pnpm exec kadal-deck dev --host # also on your network, for a phonepnpm exec kadal-deck dev --host --https # a self-signed certificate: the phone's motion sensors workpnpm exec kadal-deck dev --tunnel # an https address on the internet, password-guardedpnpm exec kadal-deck dev --remote s3cret # on the network; presenter pages need the passwordpnpm exec kadal-deck dev --port 3030 --open # any Vite flagyarn kadal-deck dev # http://localhost:5173/yarn kadal-deck dev --host # also on your network, for a phoneyarn kadal-deck dev --host --https # a self-signed certificate: the phone's motion sensors workyarn kadal-deck dev --tunnel # an https address on the internet, password-guardedyarn kadal-deck dev --remote s3cret # on the network; presenter pages need the passwordyarn kadal-deck dev --port 3030 --open # any Vite flagbunx kadal-deck dev # http://localhost:5173/bunx kadal-deck dev --host # also on your network, for a phonebunx kadal-deck dev --host --https # a self-signed certificate: the phone's motion sensors workbunx kadal-deck dev --tunnel # an https address on the internet, password-guardedbunx kadal-deck dev --remote s3cret # on the network; presenter pages need the passwordbunx kadal-deck dev --port 3030 --open # any Vite flagStarts Vite with the deck. Editing deck.mdx updates the slide you are on without a reload.
| Option | Meaning |
|---|---|
--host |
listen on the network, so a phone on the same Wi-Fi can open the deck and the phone remote |
--https |
serve a self-signed certificate (made with openssl); phones only allow motion sensors, which the remote’s air pointer uses, on https |
--tunnel |
put the deck on the internet through a Cloudflare Quick Tunnel (needs cloudflared installed): prints an https address and a QR code. Always password-guarded: a password is made up and printed unless --remote <password> gives one |
--remote [password] |
listen on the network like --host; with a password, the presenter, notes, notes editor and overview pages and the dev server’s save endpoints ask anyone not on this computer for it |
| any Vite flag | passed through: --port, --open, --strictPort, --mode… |
While it runs, the dev server also saves what you change in the browser back into your files:
E opens the side editor (the slide’s source beside it, saved with
Ctrl/⌘ S); notes edited in the presenter view, /notes,
/overview and /notes-edit; <Drag> positions; drawings with drawings: { persist: files };
and {monaco-write} editors. A built deck saves none of these.
The starter’s vite.config.ts reads KADAL_DECK_API: KADAL_DECK_API=http://localhost:8797 npm run dev
proxies /api to a room server you run and switches the deck’s live room on.
npx kadal-deck checknpx kadal-deck check --json # for scripts and agentspnpm exec kadal-deck checkpnpm exec kadal-deck check --json # for scripts and agentsyarn kadal-deck checkyarn kadal-deck check --json # for scripts and agentsbunx kadal-deck checkbunx kadal-deck check --json # for scripts and agentsLints the deck: YAML and frontmatter keys and types; unknown layouts, backgrounds, themes,
transitions and components; MDX compile errors with file and line; broken src: includes and
<<< snippets; missing images, video and favicon; the glossary; code-fence options; misspelt
icons; settings that only work in the headmatter; and syntax from other tools that compiles but
does nothing. Exit code 1 when there are errors; warnings alone exit 0.
| Option | Meaning |
|---|---|
--no-compile |
skip compiling each slide’s MDX (faster) |
format
Section titled “format”npx kadal-deck format # deck.mdx and the files it includesnpx kadal-deck format parts/intro.mdxnpx kadal-deck format --check # write nothing; exit 1 if a file would changepnpm exec kadal-deck format # deck.mdx and the files it includespnpm exec kadal-deck format parts/intro.mdxpnpm exec kadal-deck format --check # write nothing; exit 1 if a file would changeyarn kadal-deck format # deck.mdx and the files it includesyarn kadal-deck format parts/intro.mdxyarn kadal-deck format --check # write nothing; exit 1 if a file would changebunx kadal-deck format # deck.mdx and the files it includesbunx kadal-deck format parts/intro.mdxbunx kadal-deck format --check # write nothing; exit 1 if a file would changeNormalises separators and frontmatter, formats the YAML (comments and key order kept) and each
slide’s Markdown with Prettier, and leaves code, notes, magic move, <style>, maths, ::slot::
markers, code groups and <<< imports exactly as written. A slide whose meaning would change keeps
its text, and the command says which and why. The deck’s own Prettier config applies. The same
formatter is the Prettier plugin.
| Option | Meaning |
|---|---|
--check |
report only; exit code 1 when a file would change |
npx kadal-deck info # the topics, with how many entries each hasnpx kadal-deck info components Poll # one entry in fullnpx kadal-deck info layouts --markdown # a whole topic, long formnpx kadal-deck info --search "two columns"npx kadal-deck info themes # also the theme and addon packages this deck can seepnpm exec kadal-deck info # the topics, with how many entries each haspnpm exec kadal-deck info components Poll # one entry in fullpnpm exec kadal-deck info layouts --markdown # a whole topic, long formpnpm exec kadal-deck info --search "two columns"pnpm exec kadal-deck info themes # also the theme and addon packages this deck can seeyarn kadal-deck info # the topics, with how many entries each hasyarn kadal-deck info components Poll # one entry in fullyarn kadal-deck info layouts --markdown # a whole topic, long formyarn kadal-deck info --search "two columns"yarn kadal-deck info themes # also the theme and addon packages this deck can seebunx kadal-deck info # the topics, with how many entries each hasbunx kadal-deck info components Poll # one entry in fullbunx kadal-deck info layouts --markdown # a whole topic, long formbunx kadal-deck info --search "two columns"bunx kadal-deck info themes # also the theme and addon packages this deck can seeThe engine’s reference, from the same catalog as the component reference.
Topics: components, layouts, backgrounds, themes, transitions, clicks, code, deck,
slide, keys, routes, live, cli, exit.
| Option | Meaning |
|---|---|
--search <words> |
entries in any topic matching the words |
--markdown |
print a topic as Markdown |
--json |
the data |
npx kadal-deck build # dist/npx kadal-deck build --base /talks/tides/ # for https://example.com/talks/tides/npx kadal-deck build intro.mdx deep-dive.mdx # dist/intro/, dist/deep-dive/ and a page listing thempnpm exec kadal-deck build # dist/pnpm exec kadal-deck build --base /talks/tides/ # for https://example.com/talks/tides/pnpm exec kadal-deck build intro.mdx deep-dive.mdx # dist/intro/, dist/deep-dive/ and a page listing themyarn kadal-deck build # dist/yarn kadal-deck build --base /talks/tides/ # for https://example.com/talks/tides/yarn kadal-deck build intro.mdx deep-dive.mdx # dist/intro/, dist/deep-dive/ and a page listing thembunx kadal-deck build # dist/bunx kadal-deck build --base /talks/tides/ # for https://example.com/talks/tides/bunx kadal-deck build intro.mdx deep-dive.mdx # dist/intro/, dist/deep-dive/ and a page listing themBuilds a static site any host can serve. Every route gets its own index.html, and 404.html and
_redirects are written, so /presenter, /join and /remote work on hosts without rewrite
rules. The page’s <head> comes from the headmatter: title, info, author, lang, favicon
and seoMeta. More in Build and host anywhere.
| Option | Meaning |
|---|---|
--base <path> |
where the deck will be served, e.g. /talks/tides/ (Vite’s own flag) |
--out <dir> |
where the build goes (default dist/; Vite’s --outDir works too) |
--without-notes |
leave the speaker notes out: no notes modules at all |
--download, --no-download |
also print dist/deck.pdf for the deck’s Download button (download: true in the headmatter does this too), or skip it |
--port <n> |
the port of the preview server the PDF is printed from |
--pwa, --no-pwa |
make an installable app that presents offline (pwa: true does this too) |
--bundle-remote-assets |
download remote images, video and fonts into the build (bundleRemoteAssets: true) |
| any Vite flag | passed through |
--download, seoMeta.ogImage: auto and a PWA’s icons need Playwright’s Chromium
(npm i -D playwright && npx playwright install chromiumpnpm add -D playwright && pnpm dlx playwright install chromiumyarn add -D playwright && yarn dlx playwright install chromiumbun add -D playwright && bunx playwright install chromium).
npx kadal-deck serve # dist/ on http://127.0.0.1:4173/npx kadal-deck serve dist --host 0.0.0.0 --port 8080pnpm exec kadal-deck serve # dist/ on http://127.0.0.1:4173/pnpm exec kadal-deck serve dist --host 0.0.0.0 --port 8080yarn kadal-deck serve # dist/ on http://127.0.0.1:4173/yarn kadal-deck serve dist --host 0.0.0.0 --port 8080bunx kadal-deck serve # dist/ on http://127.0.0.1:4173/bunx kadal-deck serve dist --host 0.0.0.0 --port 8080Serves a build the way a static host would: at the base it was built for, every route answered, byte ranges for video, a CDN’s cache headers. Use it to check a build, try the offline app, or as a container’s server. Ctrl C stops it.
| Option | Meaning |
|---|---|
[folder] |
the build to serve (default dist) |
--port <n> |
default 4173 |
--host <addr> |
default 127.0.0.1; 0.0.0.0 in a container |
--base <path> |
the path it is served under (default: read from the build) |
npx kadal-deck ci github-pagesnpx kadal-deck ci netlify,docker --forcepnpm exec kadal-deck ci github-pagespnpm exec kadal-deck ci netlify,docker --forceyarn kadal-deck ci github-pagesyarn kadal-deck ci netlify,docker --forcebunx kadal-deck ci github-pagesbunx kadal-deck ci netlify,docker --forceWrites what a host needs to build and serve the deck, fitted to its package manager (from the
lockfile) and its folder in the repository. A deck whose build needs Chromium (download: true,
ogImage: auto, pwa) gets the step that installs it. Each recipe prints what to do next.
| Host | Writes |
|---|---|
github-pages |
.github/workflows/deploy-deck.yml at the repository root, building with --base /<repo>/ (or / for <owner>.github.io) |
netlify |
netlify.toml: the build, dist/, the single-page rewrite, cache headers |
vercel |
vercel.json, the same for Vercel |
cloudflare |
wrangler.jsonc for Workers static assets (npx wrangler deploypnpm dlx wrangler deployyarn dlx wrangler deploybunx wrangler deploy after the build) |
docker |
Dockerfile, nginx.conf and .dockerignore: builds in Node, serves dist/ from nginx on port 8080 |
gh, pages, cf and workers are accepted as short names. Existing files are left alone unless
you pass --force.
npx kadal-deck relay # ws://<this machine>:4174, a password printednpx kadal-deck relay --tunnel # a wss:// address on the internetnpx kadal-deck relay --password s3cret --port 9000pnpm exec kadal-deck relay # ws://<this machine>:4174, a password printedpnpm exec kadal-deck relay --tunnel # a wss:// address on the internetpnpm exec kadal-deck relay --password s3cret --port 9000yarn kadal-deck relay # ws://<this machine>:4174, a password printedyarn kadal-deck relay --tunnel # a wss:// address on the internetyarn kadal-deck relay --password s3cret --port 9000bunx kadal-deck relay # ws://<this machine>:4174, a password printedbunx kadal-deck relay --tunnel # a wss:// address on the internetbunx kadal-deck relay --password s3cret --port 9000The phone remote for a deck built with kadal-deck build and served from a
static host, which has neither a live room nor a dev server. The deck names the relay with
remote: { relay: "wss://…" } in its headmatter, or the presenter view’s address carries
?relay=wss://…. Details in Remote relay.
| Option | Meaning |
|---|---|
--port <n> |
default 4174 |
--host <addr> |
default 0.0.0.0 (on the network) |
--password <p> |
the password the presenter view gives once; else KADAL_DECK_RELAY_PASSWORD, else one is made up and printed |
--tunnel |
through a Cloudflare Quick Tunnel (needs cloudflared); prints the wss:// address a deck on https needs |
screenshot
Section titled “screenshot”npx kadal-deck screenshot # every slide into screenshots/npx kadal-deck screenshot --slide 1 --slide 5 # by number, counting from 1npx kadal-deck screenshot --slide 3-6 # a rangenpx kadal-deck screenshot --slide results # by slide idnpx kadal-deck screenshot --scheme dark --width 1920pnpm exec kadal-deck screenshot # every slide into screenshots/pnpm exec kadal-deck screenshot --slide 1 --slide 5 # by number, counting from 1pnpm exec kadal-deck screenshot --slide 3-6 # a rangepnpm exec kadal-deck screenshot --slide results # by slide idpnpm exec kadal-deck screenshot --scheme dark --width 1920yarn kadal-deck screenshot # every slide into screenshots/yarn kadal-deck screenshot --slide 1 --slide 5 # by number, counting from 1yarn kadal-deck screenshot --slide 3-6 # a rangeyarn kadal-deck screenshot --slide results # by slide idyarn kadal-deck screenshot --scheme dark --width 1920bunx kadal-deck screenshot # every slide into screenshots/bunx kadal-deck screenshot --slide 1 --slide 5 # by number, counting from 1bunx kadal-deck screenshot --slide 3-6 # a rangebunx kadal-deck screenshot --slide results # by slide idbunx kadal-deck screenshot --scheme dark --width 1920Builds the deck, opens it in headless Chromium and writes one PNG per slide, every click revealed:
screenshots/slide-001.png, slide-002.png… Needs Playwright’s Chromium. Slide numbers count
from 1, the same as the deck’s counter and export --range; the URL hash (#/1) still counts from 0.
| Option | Meaning |
|---|---|
--slide <n|id|all> |
which slides: a number counting from 1, a range (3-6) or a slide id, repeated or comma-separated (default all); 0 still works, with a note |
--out <dir> |
default screenshots/ |
--width <px> |
the picture’s width (default 1280; the slide’s own is 1920) |
--scheme light|dark |
the colour scheme |
--theme <name> |
one of the deck’s themes |
--dev |
use a dev server instead of building |
--url <url> |
photograph a deck that is already running |
export
Section titled “export”npx kadal-deck export # export/<name>.pdfnpx kadal-deck export --png --pptx # also PNGs and an image PowerPoint filenpx kadal-deck export --format pptx-editable # PowerPoint text, shapes and tables you can editnpx kadal-deck export --range 1,3-5 --darkpnpm exec kadal-deck export # export/<name>.pdfpnpm exec kadal-deck export --png --pptx # also PNGs and an image PowerPoint filepnpm exec kadal-deck export --format pptx-editable # PowerPoint text, shapes and tables you can editpnpm exec kadal-deck export --range 1,3-5 --darkyarn kadal-deck export # export/<name>.pdfyarn kadal-deck export --png --pptx # also PNGs and an image PowerPoint fileyarn kadal-deck export --format pptx-editable # PowerPoint text, shapes and tables you can edityarn kadal-deck export --range 1,3-5 --darkbunx kadal-deck export # export/<name>.pdfbunx kadal-deck export --png --pptx # also PNGs and an image PowerPoint filebunx kadal-deck export --format pptx-editable # PowerPoint text, shapes and tables you can editbunx kadal-deck export --range 1,3-5 --darkBuilds the deck and prints it in headless Chromium into export/. Every flag is in the
export reference, and Export to PDF, PNG and PPTX walks
through it.
| Option | Meaning |
|---|---|
--format pdf,png,pptx,pptx-editable,md |
the formats (default pdf) |
--png, --pptx, --pptx-editable, --md, --no-pdf |
the same as switches |
--range 1,3-5 |
some slides, 1-based, in play order; 8- runs to the end |
--dark, --scheme light|dark |
the colour scheme |
--with-clicks, --no-with-clicks |
a page per click step, or one per slide |
--omit-background |
transparent pages |
--no-with-toc |
no PDF bookmarks |
--vector-pdf |
print with the browser alone (all vector; effects vary by viewer) |
--per-slide |
load each slide on its own, for very large decks |
--out <dir>, --output <name> |
the folder (default export/) and the files’ base name |
--scale <n> |
capture scale (default 2) |
--timeout <ms>, --wait <ms>, --wait-until … |
page-load limits |
--executable-path <path> |
a Chrome or Chromium of your own |
--url <url>, --port <n> |
export a running deck; the preview server’s port |
--posters, --refresh-posters, --no-posters |
stand-in pictures for embedded pages |
narrate
Section titled “narrate”npx kadal-deck narrate --setup # once: installs kokoro-js (about 400 MB) into the decknpx kadal-deck narrate # speak every notes segment into public/narration/pnpm exec kadal-deck narrate --setup # once: installs kokoro-js (about 400 MB) into the deckpnpm exec kadal-deck narrate # speak every notes segment into public/narration/yarn kadal-deck narrate --setup # once: installs kokoro-js (about 400 MB) into the deckyarn kadal-deck narrate # speak every notes segment into public/narration/bunx kadal-deck narrate --setup # once: installs kokoro-js (about 400 MB) into the deckbunx kadal-deck narrate # speak every notes segment into public/narration/Bakes the narration: each [click] part of every slide’s notes is spoken by
Kokoro-82M on your computer and saved as MP3 or Opus (with ffmpeg) or WAV, indexed in
public/narration.json. Clips that exist are skipped.
| Option | Meaning |
|---|---|
--voice <id> |
a Kokoro voice (default af_heart) |
--dtype fp32|fp16|q8|q4|q4f16 |
the model’s precision |
--force |
speak every clip again |
--setup |
install kokoro-js into the deck first |
npx kadal-deck loginpnpm exec kadal-deck loginyarn kadal-deck loginbunx kadal-deck loginPrints a short code and opens deck.kadal.cc in your browser; sign in, approve the code for a
workspace, and the terminal receives an API token. It is saved in
~/.config/kadal-deck/credentials.json (or under $XDG_CONFIG_HOME). You never type a password
into the terminal. --host <url> signs in to another Kadal Deck host.
logout
Section titled “logout”Forgets the saved token on this computer. The token itself stays valid until you revoke it on the dashboard’s API tokens page.
whoami
Section titled “whoami”Prints who is signed in, on which host and workspace. Exit code 3 when nobody is.
publish
Section titled “publish”npx kadal-deck publishnpx kadal-deck publish --slug q3-review --title "Q3 review" --without-notespnpm exec kadal-deck publishpnpm exec kadal-deck publish --slug q3-review --title "Q3 review" --without-notesyarn kadal-deck publishyarn kadal-deck publish --slug q3-review --title "Q3 review" --without-notesbunx kadal-deck publishbunx kadal-deck publish --slug q3-review --title "Q3 review" --without-notesBuilds the deck for its address, uploads only the files the host doesn’t already have, makes the
new version current and prints the URL: https://decks.kadal.cc/@<handle>/<slug>/. The first
publish of a slug creates the deck; every later one adds a version. See
The hosted service.
| Option | Meaning |
|---|---|
--slug <slug> |
the deck’s slug in the workspace (default: the folder’s name) |
--title <title> |
the deck’s title (default: the headmatter’s title) |
--workspace <handle> |
another workspace you belong to (default: the one you signed in to) |
--without-notes |
publish without the speaker notes |
--no-thumbnail |
skip the picture of slide 1 the dashboard shows in its lists |
--pwa |
keep the deck’s offline service worker (left out on the host by default) |
--host <url> |
another host than deck.kadal.cc |
The picture is slide 1 as visitors see it: with the deck’s pro/ background or layout when its
workspace has the Pro library, and in its colorScheme. A deck that follows the viewer (auto,
the default) is pictured in both light and dark, and the dashboard shows the one in its own theme.
thumbnail
Section titled “thumbnail”npx kadal-deck thumbnail # this folder's decknpx kadal-deck thumbnail --slug q3-reviewnpx kadal-deck thumbnail --all # every published deck in the workspacenpx kadal-deck thumbnail --all --out pictures/ # save the PNGs, send nothingpnpm exec kadal-deck thumbnail # this folder's deckpnpm exec kadal-deck thumbnail --slug q3-reviewpnpm exec kadal-deck thumbnail --all # every published deck in the workspacepnpm exec kadal-deck thumbnail --all --out pictures/ # save the PNGs, send nothingyarn kadal-deck thumbnail # this folder's deckyarn kadal-deck thumbnail --slug q3-reviewyarn kadal-deck thumbnail --all # every published deck in the workspaceyarn kadal-deck thumbnail --all --out pictures/ # save the PNGs, send nothingbunx kadal-deck thumbnail # this folder's deckbunx kadal-deck thumbnail --slug q3-reviewbunx kadal-deck thumbnail --all # every published deck in the workspacebunx kadal-deck thumbnail --all --out pictures/ # save the PNGs, send nothingTakes the picture of slide 1 again for the version that is live, without publishing a new one: the build is read from the host, so it needs no deck folder (only Playwright and Chromium). Use it after an engine update changes how pictures are taken, or for a deck whose picture shows the wrong background or the wrong light or dark.
| Option | Meaning |
|---|---|
--slug <slug> |
the deck (default: this folder’s, from its last publish or pull) |
--all |
every published deck in the workspace |
--out <dir> |
save <slug>.png (and <slug>-dark.png) there instead of sending them |
--workspace <handle> |
another workspace you belong to |
--host <url> |
another host than deck.kadal.cc |
npx kadal-deck media search icon rocketnpx kadal-deck media search gif "mind blown" --limit 4npx kadal-deck media search emoji party --set noto-animatednpx kadal-deck media search kadal "ship it" --jsonnpx kadal-deck media search store seigaiha --type patternnpx kadal-deck media trending gifnpx kadal-deck media list --kind sticker # your workspace's uploadsnpx kadal-deck media add "logo" --to public/stickers/pnpm exec kadal-deck media search icon rocketpnpm exec kadal-deck media search gif "mind blown" --limit 4pnpm exec kadal-deck media search emoji party --set noto-animatedpnpm exec kadal-deck media search kadal "ship it" --jsonpnpm exec kadal-deck media search store seigaiha --type patternpnpm exec kadal-deck media trending gifpnpm exec kadal-deck media list --kind sticker # your workspace's uploadspnpm exec kadal-deck media add "logo" --to public/stickers/yarn kadal-deck media search icon rocketyarn kadal-deck media search gif "mind blown" --limit 4yarn kadal-deck media search emoji party --set noto-animatedyarn kadal-deck media search kadal "ship it" --jsonyarn kadal-deck media search store seigaiha --type patternyarn kadal-deck media trending gifyarn kadal-deck media list --kind sticker # your workspace's uploadsyarn kadal-deck media add "logo" --to public/stickers/bunx kadal-deck media search icon rocketbunx kadal-deck media search gif "mind blown" --limit 4bunx kadal-deck media search emoji party --set noto-animatedbunx kadal-deck media search kadal "ship it" --jsonbunx kadal-deck media search store seigaiha --type patternbunx kadal-deck media trending gifbunx kadal-deck media list --kind sticker # your workspace's uploadsbunx kadal-deck media add "logo" --to public/stickers/media search looks for something to put on a slide and prints each result with the MDX to paste
and its credit. The kinds are icon (every free Iconify set), emoji, sticker, gif, meme
(finished memes), template (Imgflip’s meme templates, ready for your captions), kadal
(Kadal’s own stickers, GIF loops, meme templates and illustrations, free in any Kadal deck) and
store (Kadal Store’s shelf: patterns, wallpapers, music, sound effects, video, Lottie animations,
3D models, colour grades and more, free to place in any deck under the
Kadal Deck licence). A pattern or a wallpaper from
the store is printed a second time as the slide’s frontmatter, to go behind it.
media trending <kind> shows what is popular now. GIFs, stickers and memes from KLIPY are fetched
straight from your computer, as KLIPY asks, so sign in first with npx kadal-deck loginpnpm exec kadal-deck loginyarn kadal-deck loginbunx kadal-deck login.
media list and media add work on your workspace’s own uploads: list them, or download one into
the deck.
| Option | Meaning |
|---|---|
--limit <n> |
how many results (search and trending) |
--json |
the results as JSON, for scripts |
--set <set> |
for emoji: fluent, noto, noto-animated or twemoji |
--type <type> |
for store: one kind (pattern, music, sfx, lottie, model, lut …) |
--kind <kind> |
for list: only one kind of upload |
Every result carries its credit, so a deck never needs a hand-written credit line; credits: true
in the headmatter adds a credits slide that lists them.
npx -y @kadal/deck mcp # in a deck's foldernpx -y @kadal/deck mcp --dir ~/talks/tidespnpm dlx @kadal/deck mcp # in a deck's folderpnpm dlx @kadal/deck mcp --dir ~/talks/tidesyarn dlx @kadal/deck mcp # in a deck's folderyarn dlx @kadal/deck mcp --dir ~/talks/tidesbunx @kadal/deck mcp # in a deck's folderbunx @kadal/deck mcp --dir ~/talks/tidesA Model Context Protocol server on stdio, for Claude, Cursor, VS Code and other agents: it reads and edits the deck, checks it, renders slides to pictures, builds, exports and publishes. Setup for each client is in AI agents and MCP.
| Option | Meaning |
|---|---|
--dir <path> |
the deck folder it works in (default: where it starts) |
--allow-outside |
let its tools read and write outside that folder (off by default) |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | success (check: no errors; warnings allowed) |
| 1 | the command failed: check found errors, a build failed, the host refused |
| 2 | usage error: an unknown command or flag, a bad value, new into a folder that isn’t empty |
| 3 | not signed in, or the token was rejected: run kadal-deck login |
| 4 | a missing prerequisite: no deck.mdx here, dependencies not installed, no Playwright or Chromium |
With --json, a failure prints { "ok": false, "error": { "code", "message", "exitCode" } }.
Environment variables
Section titled “Environment variables”| Variable | Meaning |
|---|---|
KADAL_DECK_TOKEN |
an API token; wins over the saved login. How CI publishes |
KADAL_DECK_HOST |
another host (default https://deck.kadal.cc) |
KADAL_DECK_RELAY_PASSWORD |
the relay’s password when --password is not given |
XDG_CONFIG_HOME |
where the login is saved (default ~/.config) |