CLI reference
CLI reference
Section titled “CLI reference”The slida command provides two workflows:
slida open <deck-file>previews a deck with Astro’s dev server.slida build <deck-file>builds a deck as PDF by default, or as static HTML/assets with--format html.
Deck files can be .astro or .mdx.
All commands accept Astro log levels through --logLevel; unsupported values fall back to info.
slida open
Section titled “slida open”Preview a deck locally:
slida open slides/deck.mdxArguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
deck-file |
Yes | Deck file to preview (.astro or .mdx). |
Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--host <host> |
127.0.0.1 |
Host for the Astro dev server. |
--port <port>, -p <port> |
Slida config port, then 4321 |
Port for the Astro dev server. |
--open |
false |
Open the browser when the dev server starts. |
--logLevel <level> |
info |
Astro log level. |
When the server starts, Slida prints the local URL.
slida build
Section titled “slida build”Build a deck. The default output format is PDF:
slida build slides/deck.mdxBuild static HTML and assets explicitly with --format html:
slida build slides/deck.mdx --format html --out public-deckArguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
deck-file |
Yes | Deck file to build (.astro or .mdx). |
Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--format <html|pdf> |
pdf |
Output format. Use html for static HTML/assets or pdf for PDF. |
--out <path> |
Deck basename (deck/ or deck.pdf) |
Output PDF file for pdf, or static output directory for html. |
--force, -f |
false |
Overwrite an existing PDF without prompting. Only affects pdf output. |
--logLevel <level> |
info |
Astro log level. |
PDF output uses an internal static build staging directory before writing the PDF; that staging directory is not part of the public CLI surface.
If the target PDF already exists, Slida asks before overwriting in an interactive terminal.
In non-interactive mode, rerun with --force to overwrite an existing PDF.
Root command
Section titled “Root command”Running slida without a subcommand prints a short reminder to use slida open <deck-file> or slida build <deck-file>.