Generates Lua type annotations for FiveM and RedM natives. To use the natives in your editor, install fivem-lls-addon, which ships the generated output as a Lua Language Server addon.
Each native becomes an annotated stub with its namespace, side (client/server), description, parameters, return types and a link to its documentation page:
---**`PLAYER` `client`**
---[Native Documentation](https://docs.fivem.net/natives/?_0xAFAF86043E5874E9)
---@param player integer
---@return boolean
function IsPlayerFlashingStarsAboutToDrop(player) endgit clone https://github.com/overextended/rage-lua-natives.git
cd rage-lua-natives
bun install
bun start [native sets...]Pass the native sets to generate. With none, gta and rdr3 are generated. cfx is always included.
bun start # cfx + gta + rdr3
bun start gta # cfx + gta
bun start rdr3 # cfx + rdr3The natives are downloaded and written to natives/, one .lua file per namespace:
| Set | Folder | Contents | Source |
|---|---|---|---|
cfx |
natives/CFX-NATIVE |
CitizenFX natives | static.cfx.re |
gta |
natives/GTAV |
GTA V natives (FiveM) | static.cfx.re |
rdr3 |
natives/RDR3 |
Red Dead Redemption 2 (RedM) | VORPCORE/RDR3natives |
Running a set again replaces its previous output.
Other repositories can generate the natives on a schedule with the reusable workflow, which replaces the generated sets in path and commits them:
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * SUN
jobs:
natives:
permissions:
contents: write
uses: overextended/rage-lua-natives/.github/workflows/generate.yml@main
with:
native-sets: gta rdr3
path: library/natives| Input | Default | Description |
|---|---|---|
native-sets |
gta |
Native sets to generate (cfx is always included) |
path |
library/natives |
Where to write the sets in the calling repository |
ref |
main |
Ref of this repository to generate with |
commit |
true |
Commit and push, otherwise upload as a natives artifact |
commit-message |
ci: generate native definitions |
Message of the commit |
To push with something other than GITHUB_TOKEN, pass a token secret, or app-id and app-private-key secrets for a GitHub App.
- citizenfx/natives: FiveM and CFX native data
- VORPCORE/RDR3natives: RedM native data
- alloc8or/rdr3-nativedb-data: RDR3 native research
- This project builds on earlier work, with each one forked from the one before it:
- ImBaphomettt/rage-lua-types by Dylan Malandain, the original tool
- TasoOneAsia/JetbrainIDE-CFX.RE