CLI
| Command | Purpose |
|---|---|
luaudocs init [dir] [--force] [--from-moonwave] [--title <t>] [--description <d>] | Scaffold config and docs site |
luaudocs build [dir] [--emit-only] [--strict] [--url <url>] [--model <file>] | Build the static site (extraction errors skip VitePress) |
luaudocs dev [dir] [-- <vitepress args>] | Watch sources and serve a live preview (HMR) |
luaudocs llms [dir] [--out <file>] [--check] | Write llms.txt for coding agents in a checkout |
dir defaults to .. -h / --help prints this summary, and -v / --version prints the installed version.
Flags
--emit-only(build): writes generated site files (api/,.vitepress/,public/llms*.txt,public/docmodel.json) and stops before installing dependencies or running VitePress.--strict(build): promotes warnings to build failures. Combine it with--emit-onlyfor a fast CI gate (Deploying).--url(build): overrides[docs] urlfor one build (GitHub Pages workflow).--model <file>(build): writes the doc model JSON to<file>. Combine it with--emit-onlyto skip the site build.--out <file>(llms): writes the agent index to<file>instead of./llms.txtand adjusts relative links accordingly (Coding Agents).--check(llms): exits1without writing if the committed file is missing, stale, or hits extraction errors.--from-moonwave(init): migrates an existing Moonwave project (Migrating from Moonwave).--force(init): overwrites existing user-owned files (luaudocs.toml,index.md,custom.css).--title,--description(init): populate thoseluaudocs.tomlkeys instead of defaults.--(dev): forwards remaining arguments tovitepress dev(luaudocs dev -- --port 4000 --open).
What dev watches
dev rebuilds when you edit source files, root project files (CHANGELOG.md, README.md, the Rojo project file, .luaurc), the docs directory, or luaudocs.toml. Invalid edits to luaudocs.toml log an error and keep the server running on the last valid config. Only changing [docs] dir stops the session.
Exit codes
0: success.1: build,--check, or diagnostic failure (extraction errors, warnings under--strict, stalellms.txt, or subprocess failure).2: CLI usage or configuration error.
Environment
LUAUDOCS_LUTE: path to a custom Lute binary, bypassing the pinned download (Troubleshooting).