Anydocs Documents
Advanced

Build From Source

Run Anydocs from source for contribution work and local debugging.

Source builds are for contributors and for debugging Anydocs itself. If you only need to deliver a docs project, the released CLI, Studio, and MCP workflow is usually enough.

Steps

  1. Prepare the environment and open the repo
  2. Install dependencies
  3. Start the Studio development environment
  4. Preview the reader separately
  5. Run build and tests when changing source code

Prepare the environment and open the repo

Make sure the machine has Node.js >= 18 and pnpm >= 9, then clone or open the Anydocs repository root.

Install dependencies

Run `pnpm install` at the repository root to install the monorepo dependencies.

Start the Studio development environment

Use `pnpm dev` to start the local Studio development environment. If you are specifically debugging the desktop shell, use `pnpm dev:desktop` instead.

Preview the reader separately

Do not rely on `pnpm dev` for reader preview. To inspect the published reader runtime, open another terminal and use the CLI to preview a docs project such as `examples/demo-docs`.

Run build and tests when changing source code

When validating source changes, run `pnpm build` and `pnpm test`, and add more targeted workspace commands when the change scope requires it.

`pnpm dev` does not expose the full reader runtime: Plain `pnpm dev` is mainly the Studio development entrypoint. To validate public reader behavior, use CLI `preview` against a concrete docs project.
Common command pair: A common setup is `pnpm dev` for Studio plus `pnpm --filter @anydocs/cli cli preview examples/demo-docs` for the example reader.