Quickstart · 5 min
From zero to a published workbook.
You'll install the CLI, scaffold a project, build it to one HTML file, and (optionally) publish it to Studio.
1. Install the CLI
Requires Node 18+. Bun, pnpm, and yarn all work.
npm install -g @work.books/cli
workbook --version
2. Scaffold a project
Pick a slug — the file you publish later will be named after it.
The default template is a Svelte app; pass --template
for others (vanilla, react,
mdx).
workbook init pricing-analysis
cd pricing-analysis
bun install
3. Dev loop
workbook dev watches your source and serves a live
preview on a local port. The runtime sandboxing mirrors the
production iframe, so behaviour matches what your recipient sees
when they open the built file.
workbook dev
4. Build
workbook build compiles your project to one HTML
file under dist/. By default, the build embeds a
gzipped snapshot of your source so anyone with the file can run
workbook unbundle to recover the project. See
Source bundle for the wire
format and how to opt out.
workbook build
ls dist/
dist/index.html is
a self-contained workbook. You can email it, attach it to an
issue, drop it in S3, or open it locally with
open dist/index.html. No daemon, no host required.
5. Publish to Studio (optional)
If you want a shareable link with identity and revocation,
workbook publish uploads the artifact to Studio. The
first run opens a browser to sign in; subsequent runs reuse the
stored token.
workbook publish --group pricing-research
You'll get back a workbooks.sh/w/<id> URL.
Studio handles auth, the recipient hits sign-in if the workbook is
private, and the artifact streams to their browser inside a
sandboxed iframe. See Hosting on Studio
for access policies and revocation.
Next steps
- Read the standard if you want to write a workbook by hand or build your own tooling.
- Wire up an agent so Claude or Cursor can scaffold, publish, and manage workbooks for you.
- Check the CLI reference for every command and flag.