CLI · @work.books/cli

CLI reference.

The workbook CLI is the single tool for authoring, building, publishing, and inspecting workbooks. Open source, Apache-2.0, ships on npm.

npm install -g @work.books/cli

workbook init

Scaffold a new project.

workbook init <slug> [--template <name>]

  --template  svelte | react | vanilla | mdx   (default: svelte)
  --git       initialise a git repo
  --no-install  skip dependency install

workbook dev

Watch and serve a live preview at http://127.0.0.1:5174 by default.

workbook dev [--port <n>] [--host <addr>]

workbook build

Compile to one HTML artifact under dist/.

workbook build [--no-bundle] [--bundle-git] [--max-file-bytes <size>] [--out <dir>]

  --no-bundle        do not embed the source bundle
  --bundle-git       include .git/ in the source bundle
  --max-file-bytes   truncate files larger than this (default: 5M)
  --out              output directory (default: dist)

workbook unbundle

Recover the source tree from a built workbook.

workbook unbundle <file.html> [<out-dir>]

workbook publish

Upload the built artifact to Studio.

workbook publish [--group <slug>] [--visibility <v>] [--new]

  --group       target group slug (default: from workbook.config.mjs)
  --visibility  public | workspace | private (default: workspace)
  --new         mint a fresh workbook id rather than versioning

First run opens a browser for OAuth and stores the token in your OS keychain. Pass --logout to clear the stored token.

workbook inspect

Print metadata, permissions, and source-bundle stats for a workbook file.

workbook inspect <file.html>

workbook mcp serve

Run the Model Context Protocol server so an agent client can drive the CLI as a set of tool calls. See Agent setup for wiring this into Claude Code, Cursor, or Codex.

workbook mcp serve

workbook config

Inspect or edit the project's workbook.config.mjs. Most fields are also overridable per build via flags above.

workbook config get [key]
workbook config set <key> <value>

Global flags