For AI agents: the complete documentation index is available at https://lazygophers.github.io/pamphlet/en/llms.txt, the full documentation bundle is available at https://lazygophers.github.io/pamphlet/en/llms-full.txt, and this page is available as Markdown at https://lazygophers.github.io/pamphlet/en/reference/cli/serve.md.

serve

Local preview that recompiles and reloads whenever the source changes.

pamphlet serve plan.md
pamphlet serve plan.md --port 8080
OptionDefault
--port <port>4321

Reloading uses SSE (Server-Sent Events, the standard way for a server to push messages to a browser), so you never press refresh.

One file at a time

A glob matching several files errors with exit 2.

Previewing is the "watch one document while editing it" case; watching several at once means nothing — the browser shows one page anyway.

Is the preview the same as a build

Yes. serve runs the same compile pipeline and sends the result to an in-memory HTTP server instead of writing a file.

So diagnostics, placeholder boxes and size in the preview match a build exactly.