Skip to content

Work from a clone

Run deckster from a clone of its repository instead of the npm package.

You can run deckster from a clone of its repository instead of the npm package. Do it to get the example decks and all five brands locally, to try main before a release, or before you contribute. After this page you can install the clone, run any of its decks, and know how the commands differ from the npm CLI.

Install and run

You need Node.js 26 or later. You do not need to install pnpm 12.16.1 yourself: the repository pins it in devEngines in package.json, and pnpm downloads that version when you run it.

  1. Clone the repository and install its dependencies:

    git clone https://github.com/sandrinodm/deckster.git
    cd deckster
    pnpm install
  2. Run the starter deck:

    $ pnpm dev hello
    ...
    $ deck dev hello
      ➜  Local:   http://localhost:5173/
      ➜  press h + enter to show help

    pnpm dev is a script for deck dev, and pnpm echoes it as $ deck dev hello. When the workspace has changed since the last install, pnpm first runs an install and prints its progress (cut here as ...). Type q and press Enter, or press Ctrl+C, to stop it.

  3. Run the two longer decks with pnpm deck, which runs the repository’s own deck CLI:

    pnpm deck dev showcase      # a 45-slide talk about deckster
    pnpm deck dev lookbook      # every layout, option, chart, diagram and component

    Showcase and Lookbook say what is in each.

  4. Install Chromium for lint, shot, diff and export:

    pnpm --filter @deckster/cli exec playwright install chromium

    Then check a deck:

    $ pnpm deck lint hello
    decks/hello/slides/closing.mdx
      warning missing-notes (closing): The slide has no speaker notes.
              Fix: Add a `<Notes>` block saying what the slide proves and what to say, in a sentence or two.
    
    hello: 0 errors, 1 warning in 4 slides (8 steps checked).
  5. For deck present, download Electron’s binary once (about 120 MB). pnpm install does not:

    pnpm --filter @deckster/shell exec install-electron

    Until you do, pnpm deck present stops and prints this command, and says that --browser presents in Chrome instead.

How the clone differs from the npm CLI

npm CLI Clone
Command deck lint hello pnpm deck lint hello
Workspace Your folder with decks/ The repository root
Output .deck/ in your workspace .deck/ at the repository root
Brands default only default, nocturne, fieldnote, kinetic, tidewater in brands/
Decks Only the ones you make or copy hello, showcase, lookbook and six test decks in decks/
deck new <deck> Writes deck.config.ts and one slide Also writes package.json and tsconfig.json

Every deck folder in the clone is a workspace package (@deckster/deck-<name>), so a new deck has to be linked by pnpm install, and the CLI tells you to run it:

$ pnpm deck new launch-review --title "Launch review"
decks/launch-review/package.json
decks/launch-review/tsconfig.json
decks/launch-review/deck.config.ts
decks/launch-review/slides/title.mdx
Next: run `pnpm install` to link decks/launch-review, then `pnpm deck dev launch-review`.

pnpm 12 may also run the install for you before the next pnpm command, because the workspace changed. Those two extra files are also why a deck copied out of the repository into an npm workspace must lose them: they point into the monorepo.

The six test decks (layouts, components, data-stories, diagrams-demo, exemplars, apps-demo) each exercise one area of the kit for the test suites. They run like any other deck.

Which version you are on

The pages on this site describe @deckster/cli 0.8.0. A clone of main can be ahead of that release, and a feature you find there may not be in the npm package yet. Check what you have:

$ pnpm deck --version
0.8.0

To match the release exactly, run git checkout v0.8.0. With DECK unset, pnpm dev opens the deck chooser. Run pnpm dev hello to open the starter deck directly.

Before you change anything, read Contributing: it covers the checks, the tests and pull requests. Packages says what each folder under packages/ is.

Type to search…

↑↓ navigate↵ selectEsc close