English
Projects and Decks
A project holds many decks. This page explains the boundary between the two, why the theme is copied rather than shared, and how dek decides which deck a command applies to.
One project, many decks
my-talks/ # project (dekc init)
├── dek.toml # seeds for new decks: class budget, speaking rate, voice
├── .gitignore # dist/, .cache/, node_modules/, refs/, and .dek/server.json, marks.json, annotations.json
├── .rumdl.toml # Markdown rules for script.md
├── theme.css # the starting point for new decks
├── AGENTS.md # conventions for agents (dek keeps its marked block; the rest is yours)
├── tsconfig.json # editor types for slide scripts (written by dekc init)
├── assets/ # shared source material; decks copy what they use
├── refs/ # other people's decks to read, fetched from dek.toml [refs]
├── packs/ # decks handed over as files, committed; refs/ unpacks them
├── decks/
│ └── 2026-04-vite/ # deck (dekc new)
│ ├── script.md # the single source of truth
│ ├── theme.css # this deck's own copy
│ ├── slides/ # one HTML file per section, plus optional .css / .ts
│ ├── assets/ # everything the slides reference
│ ├── dist/ # build, pdf, and video output
│ └── .cache/ # screenshots, voice, and video intermediates
└── .dek/
├── schema.json # frontmatter schema, regenerated on sync
├── slide.d.ts # the DekSlide type, regenerated on sync
└── renames.json # ids dekc mv renamed, committed for dek.pubThe decks/ directory always exists, even with one deck. The CLI, the dev server, and any agent resolve paths the same way in every project.
A deck is self-contained. Nothing inside decks/2026-04-vite/ refers to anything outside it. The project is where decks live; it is not a runtime they depend on. Copy the directory, zip it, or open it years later and it renders the same.
Themes are copied, not shared
The project's theme.css is a template. dekc new copies it into the new deck, and from then on the deck owns its copy.
bash
dekc new 2026-09-dek
dekc new 2026-09-dek --theme-from 2026-04-viteConsider the alternative. If decks shared one theme, polishing it in September would change how April's deck renders. A heading that used to fit on one line would wrap, and lint would start warning about a talk you gave five months ago. A finished talk should stay finished. A physical copy is the most reliable way to guarantee that.
When a deck's theme is worth keeping, promote it with cp. There is no dedicated command.
bash
cp decks/2026-09-dek/theme.css theme.cssYour past decks are a theme library you never have to maintain.
The same rule applies to assets/ and to voice. The project's assets/ holds source material; a deck copies what it uses into its own assets/. When dek.toml has a [voice] table, dekc new copies it into the deck as voice/voice.toml, so changing the speaker in September leaves April's narration alone. The class budget and the speaking rate in dek.toml go the same way, into the new deck's frontmatter, so a stricter max_classes in September does not fail April's deck.
Other people's decks are read, not borrowed
A deck you want to learn from, yours or someone else's, is a ref. dekc ref hajimism/dek/why-dek pins it in dek.toml [refs] and fetches a snapshot into refs/, laid out as the project it came from.
bash
dekc ref hajimism/dek/why-dek
dekc show hajimism/dek/why-dek timingA ref is read-only. ls, show, theme, and shot read it; nothing writes it. To use a slide, copy what you need into your own deck and rewrite it in your theme. To build a whole deck on a ref's layouts, such as a style guide made to be built on, start it on the ref's theme:
bash
dekc new 2026-11-steerco --theme-from hajimism/dek/why-dekThe new deck gets a copy of the ref's theme.css, its first line naming the ref and the commit it came from, and nothing else of it. Your deck never refers to a ref, so it stays self-contained.
The pin in dek.toml is the ref; the snapshot is only a copy of that commit. refs/ is gitignored, and deleting it, or cloning the project somewhere new, loses nothing: the next read fetches the pinned commit again. dek never looks in refs/ when it lints or builds your decks.
A deck you cannot reach on GitHub, in another organization's private repository or in no repository at all, comes over as a pack. Its author runs dekc pack and sends the file; you pin it, and read it as file/<deck>:
bash
dekc pack 2026-10-talk # the author: writes decks/2026-10-talk/dist/2026-10-talk.tgz
dekc ref ~/Downloads/2026-10-talk.tgz # you: pins file/2026-10-talk, keeps packs/2026-10-talk.tgz
dekc show file/2026-10-talk introA pack has no commit to fetch again, so dekc ref keeps it as packs/<deck>.tgz and pins it to a digest of its files. Commit packs/ with dek.toml: it is where a clone unpacks the ref from. It also means your repository now holds someone else's deck, so keep it out of anywhere public unless its author agrees.
What the reader may do with it is the pack's LICENSE. A project dekc init creates hands its decks over under CC0 1.0, written in dek.toml as [pack] license = "CC0-1.0": a deck you pack is meant to be built on, so the reader may reuse it freely, with no credit owed in the decks they make from it. Change it to "CC-BY-4.0" to ask for credit, or delete it to hand decks over with no license.
Where you run a command decides its scope
dek finds the project root by walking up from the current directory until it finds dek.toml, the same way Cargo finds a workspace.
| Where you run it | What it applies to |
|---|---|
| Project root | Every deck |
| Inside a deck | That deck |
Anywhere, with a deck name or --deck <name> | The named deck |
From the project root, dekc lint lints every deck and dekc build builds every deck. Commands that need exactly one deck, such as dekc show intro, ask you to name it. The deck name can be a positional argument: dekc show 2026-04-vite intro, dekc lint 2026-04-vite, dekc 2026-04-vite.
Running dekc new outside any project stops and points you at dekc init. A command run inside refs/ stops too, and points you back at your project.
Next
The rules for the file every deck is built from: The Script.