CLI Tools
wowlua-ls includes command-line tools for linting and documentation generation outside an editor, useful for CI pipelines and batch analysis.
check: Lint a project
Scan an addon directory and report all diagnostics:
wowlua_ls check path/to/addonBy default (--severity warning), errors and warnings are shown. Include hints (unused locals, inject-field, style issues) with --severity hint:
wowlua_ls check path/to/addon --severity hintThe summary's type coverage line is the share of your variables, parameters, and return values whose type is known. To list the ones that aren't, enable the strict typing diagnostics and run with --severity hint.
Exit code is 1 if any reported diagnostic is found (hidden hints don't count), making it suitable for CI:
# GitHub Actions example
- name: Lint
run: wowlua_ls check . --severity warningdump-stubs: Dump global stub types
Output every global name from the precomputed stubs and its resolved type, one per line (tab-separated). Useful for diffing before and after stub regeneration:
wowlua_ls dump-stubs > before.txt
# ... regenerate stubs ...
wowlua_ls dump-stubs > after.txt
diff before.txt after.txtprofile: Measure analysis time
Time each startup phase (stub loading, workspace scan, per-file analysis) on an addon directory and list the ten slowest files. Useful for tracking down a file that makes the language server slow:
wowlua_ls profile path/to/addondoc: Generate API documentation
Generate markdown API documentation snippets from annotated Lua source:
wowlua_ls doc path/to/addon --out-dir docs/apiThis scans the project for @class definitions and produces one .md snippet per class plus an index.md in the output directory. Classes from WoW API stubs are excluded. Only classes defined within the scanned directory are included.
To document only specific classes, pass --class (repeatable). Named classes are included even when they come from the WoW API stubs:
wowlua_ls doc path/to/addon --out-dir docs/api --class InventoryCache --class ItemFilterUsing with VitePress
Per-class files are headless snippets (no # Title) designed for embedding via VitePress's include directive. Write your own page with custom prose, then include the generated API reference:
# ReactiveState
Overview of what ReactiveState does, with examples...
<!--@include: ./api/ReactiveState.md-->The included content starts at ## Fields / ## Methods level, so it integrates naturally under your page's # Title.
CI example
# GitHub Actions: generate API docs
- name: Generate API docs
run: wowlua_ls doc . --out-dir docs/api--version: Print the version
wowlua_ls --versionPrints the release the binary was built from, or 0.0.0 for a build from source. The language server reports the same version to your editor: it logs Starting wowlua_ls <version> at startup and returns it as serverInfo in its initialize response.
Contributor tools
The remaining subcommands are for working on wowlua-ls itself: evaluate and test-query (see Debugging tools), dump-types (see Hover regression testing), and regenerate-stubs (see Stub Generation).
