Skip to content

archidocs build

Write the static viewer site with the Workspace’s Bundle and past Revisions, or a PR preview site.

archidocs build [--out <dir>] [--bundle-only] [--keep <n|all>]
archidocs build --preview [--base <branch>] [--out <dir>]

Write the viewer, the latest Bundle and the past Revisions’ Bundles into site/, ready for any static host.

Terminal window
archidocs build --out site

Keep Bundles for the latest 50 past Revisions only, and for every tagged one.

Terminal window
archidocs build --out site --keep 50

Write only public/workspace.bundle.json, for mcp --bundle or a script to read.

Terminal window
archidocs build --bundle-only --out public

Write a PR preview site that opens on Compare, from origin/main to the pull request checked out.

Terminal window
archidocs build --preview --base main --out preview

--out <dir> · Default: dist.

The folder to write the site, or the Bundle, into.

--bundle-only · Off by default.

Write only workspace.bundle.json, without the viewer or past Revisions.

--keep <n|all> · Default: 200.

How many of the latest past Revisions the site keeps Bundles for, or all; tagged Revisions are always kept.

--preview · Off by default.

Build a PR preview site holding just the PR head and the base branch’s latest Revision, for Compare.

--base <branch> · Default: the branch origin/HEAD points at.

With --preview: the base branch, read from origin/<branch> without fetching.

Code Meaning
0 The site, the Bundle or the preview site was written.
1 The Workspace has errors. They are printed as check prints them, and nothing is written.
2 It could not run: an unknown flag, a flag missing its value, flags that don’t go together, a --keep that is not a count or all, no Workspace found, or with --preview a Workspace outside git or a base branch that is not in the checkout.

Exit 2 prints the reason to stderr as archidocs: <message>, and after most mistakes in the command line, the usage summary.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.