Skip to content

Home › Reference

CLI

CommandPurpose
luaudocs init [dir] [--force] [--from-moonwave] [--title <t>] [--description <d>]scaffold config + docs site
luaudocs build [dir] [--emit-only] [--strict] [--url <url>] [--model <file>]full static build; extraction errors skip VitePress
luaudocs dev [dir] [-- <vitepress args>]watch + live preview (HMR)

dir defaults to .; --help prints the same list, and --version the installed version.

Flags

  • --emit-only (build) writes all generated site files (the pages, .vitepress/ config, and llms.txt) and then stops, skipping the dependency install and the VitePress render.
  • --strict (build) turns warnings into failures. luaudocs build --emit-only --strict is the CI gate; see Deploying.
  • --url (build) overrides [docs] url for one build. The Pages workflow uses it for base paths and custom domains.
  • --model <file> (build) also writes the doc model as JSON, for tooling of your own. It is an extra output on an ordinary build; add --emit-only when you want the model without the site.
  • --from-moonwave (init) converts an existing Moonwave setup; see Migrating from Moonwave.
  • --force (init) rewrites the user-owned files init normally skips when they already exist, including luaudocs.toml. Use this flag to overwrite existing files when re-running init or migrating from Moonwave.
  • --title, --description (init) set those luaudocs.toml keys instead of taking the folder name and a placeholder description.
  • -- (dev) forwards everything after it to vitepress dev: luaudocs dev -- --port 4000 --open.

What dev watches

dev rebuilds on changes to your sources, to the root files it reads (CHANGELOG.md, README.md, the Rojo project file, .luaurc), and to the docs directory.

luaudocs.toml too: editing it reloads the config in place, re-reads whatever [source] entries now names, and rebuilds. A config that does not parse leaves the session running on the last one that did, so syntax errors log a diagnostic without terminating the dev server.

Moving [docs] dir is the one edit that still ends the session, because the server underneath is bound to the directory it started on.

Environment

  • LUAUDOCS_LUTE points at a Lute binary you provide, instead of the pinned one LuauDocs downloads and caches. See Troubleshooting.