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, only warnings are shown. Include hints (unused locals, inject-field, style issues):
wowlua_ls check path/to/addon --severity hintExit code is 1 if any diagnostics are found, 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.txtdoc: 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.
Using 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