Skip to content

CLI reference

Terminal window
npm create @kadal/deck@latest my-talk # also: pnpm create @kadal/deck, yarn create @kadal/deck, bun create @kadal/deck

Copies a starter deck into my-talk/: deck.mdx, deck.config.ts, src/main.tsx, src/components.tsx, vite.config.ts and package.json, with @kadal/deck as a dependency.

The kadal-deck command ships with @kadal/deck. Run it with npx kadal-deck <command> (or through a package.json script). kadal-deck <command> --help prints the options of the version you have installed, which is the authoritative list.

Command What it does
dev starts the Vite dev server with the deck
build builds the deck into dist/
export exports to PDF, PNG and PPTX — options in Export
login signs the CLI in to deck.kadal.cc
logout forgets the stored credentials
whoami prints the signed-in account and workspace
publish builds, uploads what changed and prints the deck’s URL

Prints a short code and opens deck.kadal.cc in your browser; approve the CLI there and it receives an API token, stored in your user configuration directory. Nothing is typed into the terminal but the command.

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> publish to another workspace you belong to (default: your current one)

Publishing is idempotent by slug: the first publish creates the deck, every later one adds a version.

Variable Meaning
KADAL_DECK_TOKEN an API token; overrides login — what CI uses
KADAL_DECK_HOST another host, for a self-hosted service (default https://deck.kadal.cc)