> For the complete documentation index, see [llms.txt](https://laot7490.gitbook.io/ltbridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://laot7490.gitbook.io/ltbridge/how-it-works/what-is-ltbridge.md).

# What is LTBridge?

LTBridge is a **build tool and module library** for FiveM. Instead of loading a giant shared library into every script, you write `LT.Inventory.AddItem` in your code and LTBridge compiles **only that function** (and its dependencies) into your resource.

## The problem it solves

Traditional bridge libraries ship hundreds of functions. Every script loads all of them — even if you only need player names and notifications. That means:

* Slower load times
* More memory use
* Messy cross-resource exports

LTBridge flips this: **your code declares what you need**, and the compiler bundles exactly that.

## How it works (simple version)

```mermaid
flowchart LR
    A[Your Lua code] --> B[LTBridge watcher]
    B --> C[Detect LT.* calls]
    C --> D[Bundle only used modules]
    D --> E[Update fxmanifest]
```

1. You write `LT.Framework.GetPlayerName()` in your script
2. The watcher sees it and adds the Framework module
3. If Framework needs other modules, those are added too
4. Everything compiles into your resource in under \~200ms

## What you get

| Feature            | Benefit                                                             |
| ------------------ | ------------------------------------------------------------------- |
| AOT compilation    | Near-instant builds, no runtime module loader                       |
| `api.lua` stubs    | Full autocomplete in VS Code / Cursor                               |
| Smart dependencies | Missing modules are added automatically                             |
| Resource adapters  | One API works with ESX, QBCore, ox\_inventory, ox\_target, and more |

## What LTBridge is not

* Not a framework replacement — it wraps your existing framework
* Not a runtime dependency — compiled code lives inside your resource
* Not a monolithic library — you only ship what you use

Next: [Modules & Dependencies](/ltbridge/how-it-works/modules-and-dependencies.md)
