> For the complete documentation index, see [llms.txt](https://atiysus-organization.gitbook.io/aty-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atiysus-organization.gitbook.io/aty-scripts/getting-started/installation.md).

# Installation

## Installation

#### 1. Dependencies first

`aty_inventory` declares exactly one hard dependency: **`aty_lib`**. That is the bridge that tells it which framework it is running on. Install and start it before this resource.

You also need a MySQL wrapper — `oxmysql`, `mysql-async` or `ghmattimysql`. Any of the three works; the resource detects which one is present.

#### 2. Drop the resource in

Extract to your resources folder and add it to `server.cfg`:

```cfg
ensure aty_lib
ensure aty_inventory
```

{% hint style="warning" %}
`aty_lib` must start **before** `aty_inventory`. If your `server.cfg` uses a folder-wide `ensure [aty]`, list `aty_lib` explicitly first — a resource that loads before its bridge cannot resolve the framework and falls back to standalone.
{% endhint %}

#### 3. The database

**There is no import step.** The resource applies its own schema at boot, every start, idempotently — seven tables, created if missing and left alone if not.

`sql/schema.sql` ships for DBAs who want to review or pre-create the two core tables by hand. Running it is optional.

See Database for what each table holds.

#### 4. Remove the old inventory

Two inventories cannot both own the `TAB` key and the item API. Stop the previous one before starting this. If other resources call it by name, keep that name working with a proxy — see Migration.

#### 5. Verify

Start the server and run this in the console:

```
invdoctor
```

It checks the install end to end — database reachable, framework detected, items loaded, images present, name collisions, config sanity — and prints each problem with the command that fixes it. A clean install reports **0 problems**.

{% hint style="success" %}
`invdoctor` is the single command to run after any change to config, items or dependencies. It is read-only and safe on a live server.
{% endhint %}

#### Next

* Dependencies — what each one is for and what breaks without it
* Configuration — the settings you actually need to touch
* Database — schema, growth and retention
