Anydocs Documents
CLI Commands

build - Build Site

Generate the static reader site plus search and AI-oriented artifacts.

`build` packages the docs project into a deployable site. It usually happens after content has already passed `preview`, and it produces static reader pages, search indexes, and AI-readable artifacts.

Basic Command

npx @anydocs/cli build ./my-docs

If you want to override the default output directory:

npx @anydocs/cli build ./my-docs --output ./build

What `build` Produces

  • reader pages such as `index.html` and `/<lang>/<slug>/index.html`
  • `search-index.<lang>.json`
  • `llms.txt` and `llms-full.txt`
  • machine-readable artifacts under `mcp/`

The default output directory is `dist/` inside the project.

Public Boundary

`build` promotes only `published` pages. `draft` and `in_review` never enter the static site, search indexes, or AI artifacts.

Finish content edits and status changes in Studio or through MCP, run `preview` as the reader-facing check, then run `build` and hand the output directory to your static hosting or deployment workflow.

Compatibility Flag

`--watch` is still available as a compatibility option, but it is not a required part of the standard release flow.