Home › Reference
CLI
| Command | Purpose |
|---|---|
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, andllms.txt) and then stops, skipping the dependency install and the VitePress render.--strict(build) turns warnings into failures.luaudocs build --emit-only --strictis the CI gate; see Deploying.--url(build) overrides[docs] urlfor 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-onlywhen 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 filesinitnormally skips when they already exist, includingluaudocs.toml. Use this flag to overwrite existing files when re-running init or migrating from Moonwave.--title,--description(init) set thoseluaudocs.tomlkeys instead of taking the folder name and a placeholder description.--(dev) forwards everything after it tovitepress 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_LUTEpoints at a Lute binary you provide, instead of the pinned one LuauDocs downloads and caches. See Troubleshooting.