> For the complete documentation index, see [llms.txt](https://dirkscripts.gitbook.io/dirkscripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dirkscripts.gitbook.io/dirkscripts-documentation/resources/dirk-lib.md).

# Library

`dirk_lib` is the shared foundation for all DirkScripts resources. It automatically detects your framework, inventory, targeting, and other resources, then provides a single consistent API that works across all of them.

***

## Why dirk\_lib?

* **Zero config** — Auto-detects ESX, QBCore, QBX, and 60+ other resources on startup.
* **One API** — Write `lib.inventory.addItem(...)` and it works with ox\_inventory, qb-inventory, dirk\_inventory, and more.
* **Lazy-loaded modules** — Only loads what you use. No bloat.
* **Built-in UI** — Notifications, context menus, progress bars, dialogs, input prompts, text UI, and more.
* **In-game config** — JSON Schema-based settings system with database persistence, change history, and NUI admin panels.
* **Developer tools** — Polygon creator, entity placer, position grabber, model viewer — all via `/devtools`.
* **Cache system** — Auto-tracks player ped, vehicle, weapon, job, gang, and more with change listeners.
* **ox\_lib compatible** — Drop-in replacement for ox\_lib exports. Scripts using ox\_lib work without changes.

***

## Supported Resources

`dirk_lib` bridges across **14 systems** with support for **60+ resources** including:

| System        | Examples                                                                                                                          |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Framework** | es\_extended, qbx\_core, qb-core, pork\_core                                                                                      |
| **Inventory** | dirk\_inventory, ox\_inventory, qb-inventory, qs-inventory, codem-inventory, core\_inventory, tgiann-inventory, origen\_inventory |
| **Target**    | ox\_target, qb-target, qtarget                                                                                                    |
| **Interact**  | sleepless\_interact                                                                                                               |
| **Keys**      | qb-vehiclekeys, wasabi\_carlock, Renewed-Vehiclekeys, and 10+ more                                                                |
| **Fuel**      | LegacyFuel, ox\_fuel, cdn-fuel, and 8+ more                                                                                       |

[**Full list of supported resources →**](https://github.com/DirkDigglerz/dirk_lib/blob/main/src/autodetect.lua)
