LuauDocsNo tags. Real types. One command.
Generates VitePress documentation sites from your Luau source code. Evaluates what your modules return, reads your type annotations and doc comments directly, and links every type to its definition.
Generates VitePress documentation sites from your Luau source code. Evaluates what your modules return, reads your type annotations and doc comments directly, and links every type to its definition.
local State = require("@self/State")
local Util = require("@self/Util")
--[[ A tiny reactive state library. ]]
local Flux = {}
Flux.State = State
Flux.Util = Util
--[[ Reports whether `value` is a state. ]]
Flux.isState = State.isState
--[[
Creates a state holding `initial`.
Call the state to read it, and see [State:Connect] for reacting to changes.
]]
function Flux.state<T>(initial: T?): State.State<T>
return State.new(initial)
end
return FluxLuauDocs parses your module and symbolically evaluates its top-level return statement. Everything reachable from that return value becomes your public API reference, while local helpers and _-prefixed members stay private automatically.
state Flux.state<T>(initial: T?): State.State<T>Creates a state holding initial.
Call the state to read it, and see State:Connect for reacting to changes.
isState from State Flux.isState(value: any): booleanReports whether value is a state.
Signatures come straight from your Luau annotations, so you never duplicate parameter or return types in @param and @return tags. Referenced types link to their declarations, [State:Connect] resolves to its method entry, and behavioral badges like Yields and Server are inferred from your code.
## Flux
- [Flux](examples/Flux/init.luau): A tiny reactive state library.
- [`Flux.State: State`](examples/Flux/State.luau): [Module]
- [`Flux.state<T>(initial: T?): State.State<T>`](examples/Flux/init.luau#L18-L20): Creates a state holding `initial`.
- [`Flux.isState(value: any): boolean`](examples/Flux/State.luau#L20-L22): [from State] Reports whether `value` is a state.Run luaudocs dev to preview a searchable VitePress site with live reload, or luaudocs llms to write a compact llms.txt index linking every guide and public symbol to its file:line declaration. For custom tooling, run luaudocs build --model model.json to export your full API as JSON.
LuauDocs handles the full documentation workflow out of the box:
return value to find public functions, classes, properties, and re-exports without doc tags.Yields, Server, Client, Plugin, and Read Only badges directly from function bodies, RunService guards, and table.freeze.Flux.Util.Queue) rather than folder paths.llms.txt indexes with file:line source links and exports your full API as a JSON doc model.<Frame> embeds that pull live entries from your generated API pages.Requires Node.js 22.12 or newer. LuauDocs automatically downloads, verifies, and caches a pinned Lute binary on first run.
npm i -g luaudocs
cd my-luau-library
luaudocs devIf you're migrating from Moonwave, run luaudocs init --from-moonwave before dev to convert your project in place.
Read the Getting Started guide or browse the Example API generated from examples/Flux.
LuauDocs is free and MIT-licensed. If LuauDocs is useful to you or your team, you can support its development through GitHub Sponsors or Ko-fi.