| Crates.io | emmylua_doc_cli |
| lib.rs | emmylua_doc_cli |
| version | 0.14.0 |
| created_at | 2025-02-03 13:00:48.637568+00 |
| updated_at | 2025-09-19 11:29:27.241529+00 |
| description | A command-line tool for generating lua documentation. |
| homepage | |
| repository | https://github.com/CppCXY/emmylua-analyzer-rust |
| max_upload_size | |
| id | 1540548 |
| size | 145,202 |
emmylua_doc_cli is a powerful command-line tool for generating documentation directly from your Lua source code and EmmyLua annotations. Built with Rust, it offers exceptional performance and is a core component of the emmylua-analyzer-rust ecosystem.
---@class, ---@field, ---@param, etc.) to generate detailed and accurate documentation.--override-template to match your project's branding.--mixin option to add guides, tutorials, or other static pages.Install emmylua_doc_cli via cargo:
cargo install emmylua_doc_cli
Alternatively, you can grab pre-built binaries from the GitHub Releases page.
Generate documentation for all Lua files in the src directory and output to the default ./docs folder:
emmylua_doc_cli ./src -o ./docs
Output the documentation structure as a JSON file for custom processing:
emmylua_doc_cli . -f json -o ./api.json
Set a custom name for the generated documentation site:
emmylua_doc_cli . -o ./docs --site-name "My Awesome Project"
Exclude certain directories or files from the documentation:
emmylua_doc_cli . -o ./docs --ignore "third_party/**,test/**"
Automate the process of building and deploying your documentation to GitHub Pages using GitHub Actions.
Example .github/workflows/docs.yml:
name: Generate and Deploy Docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install emmylua_doc_cli
run: cargo install emmylua_doc_cli
- name: Generate Docs
run: emmylua_doc_cli ./src -o ./docs --site-name "My Project"
Usage: emmylua_doc_cli [OPTIONS] [WORKSPACE]...
Arguments:
[WORKSPACE]... Path to the workspace directory
Options:
-c, --config <CONFIG> Configuration file paths. If not provided, both ".emmyrc.json" and ".luarc.json" will be searched in the workspace directory
--ignore <IGNORE> Comma separated list of ignore patterns. Patterns must follow glob syntax
-f, --output-format <OUTPUT_FORMAT> Specify output format [default: markdown] [possible values: json, markdown]
-o, --output <OUTPUT> Specify output destination (can be stdout when output_format is json) [default: ./output]
--override-template <OVERRIDE_TEMPLATE> The path of the override template
--site-name <SITE_NAME> [default: Docs]
--mixin <MIXIN> The path of the mixin md file
--verbose Verbose output
-h, --help Print help
-V, --version Print version