Rivo FX
Free developer library for FiveM: typed errors, fibers, validated net events, typed RPC, cleanup that runs, metrics, tracing and in-game devtools. Lua and TypeScript.
Free
By Rivo





Description
Rivo FX
Typed, safe FiveM scripting for developers. Rivo FX brings the model of Effect to FiveM Lua and TypeScript: errors you can see, fibers that clean up after themselves, services through Layers, and a schema on every payload that crosses a trust boundary.
Free and MIT licensed. Source on GitHub.
What it fixes
- Net events that validate first. A handler never sees a payload that fails its schema, and every player is rate limited per event by default. Rejected payloads become security events you can log or send to a webhook.
- RPC with timeouts and typed errors. A
NotEnoughMoneyraised on the server arrives on the client asNotEnoughMoney. Calls time out and cancel the handler. Defects never leak details to clients. - Cleanup that actually runs. Scopes close when the resource stops or the player drops: spawned entities deleted, models released, in-flight handlers interrupted.
- No more endless
while not HasModelLoaded do Wait(0) end. Asset loads have timeouts and typed errors.
What's inside
- Core: effects, typed errors, fibers and structured concurrency, scopes, Layers, retry schedules, Schema, Streams
- FiveM: validated net events, typed RPC (with ox_lib callback compatibility), security events, players, typed convars, assets, scoped entities, KVP, schema-typed state bags, oxmysql, ticks, NUI
- Frameworks: one player, money and job API over ESX, QBCore, Qbox and standalone
- Observability: metrics and tracing across client and server, with a token-protected Prometheus endpoint
- Devtools:
/fxdevin game shows live fibers, traces, failures and metrics for every resource, on the server and your client - TypeScript:
@rivolabs/fxon npm for JS resources on the real Effect package,@rivolabs/fx-nuifor NUI pages, and therivo-fxCLI to generate schemas for every side
Install
- Download
rivo_fx.zip, putrivo_fxin your resources andensure rivo_fxfirst. - In your resource:
dependency 'rivo_fx'andshared_script '@rivo_fx/init.lua'.
Full docs, recipes and a migration guide are in the docs tab. For AI assistants, the whole reference is one file: llms-full.md.
Details
- For: script developers. Players see nothing unless you build it.
- Framework: standalone, with layers for ESX, QBCore and Qbox
- Dependencies: none. oxmysql and ox_lib are used when present.
- Source: open, MIT, not escrowed
- Runtime: Lua 5.4; JS/TS through
@rivolabs/fx
Compatibility
- standalone
- esx
- qbcore
- qbox
Requirements
- standalone
- esx
- qbcore
- qbox
- oxmysql
- ox_lib
Tags
- standalone
- developer
- library
- open-source