Campfire

CLI

camp — deterministic, agent-friendly commands

The CLI is a thin orchestration layer: commands delegate to @campfire-deck/core, @campfire-deck/app, and the shadcn installer. Every command accepts --json; every mutation accepts --dry-run. campfire is an alias of camp.

camp

camp [dir] [--port 3030] [--no-open]

Starts the live shell: overview, presentation mode, hot reload, diagnostics. Works from any subdirectory — the root is discovered by walking up to the nearest directory containing slides/.

camp export

camp export [dir] [--out deck.pdf]

Exports the deck as a vector PDF — one page per slide at exact canvas size, with selectable text. Requires Chromium via the optional playwright-chromium package:

bun add -D playwright-chromium

Under the hood the shell exposes a #/print route that renders every slide at fixed canvas size with page breaks; opening it in a browser and hitting Cmd+P produces the same result manually.

camp validate

camp validate [--json]
✓ 12 slides
✓ 4 layouts
✓ 8 components
✓ No diagnostics

Exits non-zero when any error-level diagnostic exists. Diagnostics include missing-layout, duplicate-slide-number, invalid-slide-filename, slide-esm, unknown-component, component-collision, invalid-frontmatter, and missing-theme.

camp inspect

camp inspect --json

Prints the full project model — slides (with frontmatter), layouts, components, theme, canvas, config, and diagnostics — as stable JSON. This is the primary read API for coding agents.

camp add

camp add metric-card problem-solution

Installs shadcn-compatible registry items. Bare names resolve against the Campfire registry; full URLs and .json paths pass through untouched. Set CAMPFIRE_REGISTRY_URL to point at another registry.

camp slide

File mutations with safe renumbering:

camp slide add <slug> [--title t] [--layout l] [--notes n] [--at N]
camp slide move <slide> <position>
camp slide remove <slide>
camp slide rename <slide> <new-slug>
camp slide update <slide> [--title t] [--layout l] [--notes n] [--body b] [--clear title,notes]

<slide> accepts an id (03-solution), a slug (solution), or a number (3). All mutations validate before writing, return the planned operations, and renumber via two-phase renames so swaps cannot collide.

On this page