Start here
Getting started
Five steps from empty directory to deployed document.
wrangler for PDF / Cloudflare deploy (only when needed).
1. Scaffold
npx @open-press/cli init my-paper \
--title "Transport models in dense networks"
cd my-paper
Starter content comes from domain skills, not bundled packs. After init, install or invoke a
skill that knows your document type (e.g. academic-paper or an external social-card
skill) and let the agent populate press/. See
Skills.
2. Edit content
Everything you write lives under press/. Runtime internals live in
node_modules/@open-press/ after install; treat those packages as read-only.
press/index.tsx— the Press Tree composition and the document's config.<Press>props declare title / page / sources; children declare the page tree. See <Press>.press/chapters/**/*.mdx— prose, broken into chapters. Each chapter is one MDX file inside a folder; subfolders become document sections.press/components/**/*.tsx— workspace-local React components (custom blocks, special figures, scoped tables).press/theme/— CSS tokens, page surfaces, type scale, optional pattern utilities. See Themes.press/media/— images, vector assets. Synced into the public bundle on export.package.json— the"openpress.deploy"field is where build-time deploy adapter settings live. See Workspace config.
import { Workspace, Press, Frame, mdxSource } from "@open-press/core";
import { Sections, Toc } from "@open-press/core/manuscript";
export default function Project() {
return (
<Workspace>
<Press
title="My document"
page="a4"
sources={[
mdxSource({ id: "story", preset: "section-folders", root: "chapters" }),
]}
>
<Frame frameKey="cover" role="document.cover">
<h1>My document</h1>
{/* subtitle / organization / author all live in JSX */}
</Frame>
<Toc source="story" maxLevel={2} />
<Sections source="story" />
</Press>
</Workspace>
);
} 3. Live preview
npm run dev
# → http://127.0.0.1:5173/workspace
The workbench reloads CSS, tokens, and React chrome on save. MDX content updates flow through
the engine's source watcher. The /workspace route opens the project gallery, and
each document opens at /<press-slug>/preview with the workbench shell
(inspector, source-edit endpoint, comment markers).
4. Build + verify
npm run build # validates + renders dist-react/
npm run preview # serve dist-react/ as a static site
npm run openpress:pdf # optional: generate PDF locally build chains structural validation, MDX → React export, and Vite production build.
If validation fails the build aborts before Vite runs, so a green build means the document
shape is consistent. See CLI · Lifecycle for what each step
does.
5. Deploy
OpenPress requires explicit confirmation for any deploy — there is no silent publish. Configure
the adapter under the "openpress.deploy" field in the workspace
package.json, then:
npm run openpress:deploy:dry-run # preview the steps
npm run openpress:deploy -- --confirm # publish
The deploy command builds, generates a PDF stage artifact, writes deploy.json
metadata, and hands off to the adapter. Today only cloudflare-pages is marked
Impl; static-dir is documented as a Plan adapter
in CLI · Output targets.
What to read next
- Product boundary — when OpenPress is the right tool, and when it isn't.
- Themes — the
press/theme/contract. - Components → Press — the Press Tree primitives.
- Comment markers — the inline-review workflow.
- CLI — full command reference (three tiers).