Cfx Types Generator
This tool scans FiveM and RedM server resources to automatically generate Lua type definitions for exports, GlobalState, and Player/LocalPlayer state bags. It parses LuaDoc comments and detects both function-based and inline exports, producing IntelliSense-ready files for VS Code.
The generator separates client, server, and shared contexts while supporting configurable input/output paths through a JSON config. Generated types integrate directly with the Lua and CfxLua IntelliSense extensions to provide autocomplete and type checking during development.
- Recursively scans Lua files for exports and state variables
- Parses LuaDoc annotations for parameters and return types
- Creates unified type definitions for GlobalState and player states
- Supports configurable exclude patterns and output directories