This page shows how to use Obsi Lib from your own resource.

## Import it

Add the import to your `fxmanifest.lua`:

```lua title="fxmanifest.lua"
shared_script '@obsi-lib/init.lua'
```

Then use the global `ObsiLib` anywhere, on the server and the client.

Without the import, get the object from the export:

```lua
local ObsiLib = exports['obsi-lib']:get()
```

## Server and client

Server and client get different modules under the same names where it makes sense.
`ObsiLib.items` reads your own items on the client and edits anyone's items on the server.

- [Server API](/lib/server-api/players-jobs-money)
- [Client API](/lib/client-api/callbacks-and-player)
- [Shared API](/lib/reference/shared-api)

## Good to know

:::hint{type="warning" title="Blocking calls"}
Functions that wait for the server, such as `callback.await`, `money.get`, `license.has` and `ui.progress`, must run inside a thread or an event handler.
:::

- Everything you register (callbacks, usable items, points, target zones, keybinds, DUIs, state listeners) is removed automatically when your resource stops.
- `ObsiLib.framework` and `ObsiLib.inventory` tell you what was detected.

```lua
print(ObsiLib.framework)   -- 'esx' | 'qb' | 'qbx' | 'custom'
print(ObsiLib.inventory)   -- 'ox_inventory' | 'qb-inventory' | ... | 'custom' | 'framework'
```
