Skip to content

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:

bash
wowlua_ls check path/to/addon

By default (--severity warning), errors and warnings are shown. Include hints (unused locals, inject-field, style issues) with --severity hint:

bash
wowlua_ls check path/to/addon --severity hint

The 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:

yaml
# GitHub Actions example
- name: Lint
  run: wowlua_ls check . --severity warning

dump-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:

bash
wowlua_ls dump-stubs > before.txt
# ... regenerate stubs ...
wowlua_ls dump-stubs > after.txt
diff before.txt after.txt

profile: 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:

bash
wowlua_ls profile path/to/addon

doc: Generate API documentation ​

Generate markdown API documentation snippets from annotated Lua source:

bash
wowlua_ls doc path/to/addon --out-dir docs/api

This 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:

bash
wowlua_ls doc path/to/addon --out-dir docs/api --class InventoryCache --class ItemFilter

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:

markdown
# 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 ​

yaml
# GitHub Actions: generate API docs
- name: Generate API docs
  run: wowlua_ls doc . --out-dir docs/api

--version: Print the version ​

bash
wowlua_ls --version

Prints 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).