> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/vehicles/cuxial-chipeo/installation.md).

# Installation

Install Cuxial Chipeo step by step: dependencies, items, speaker props, staff permission and start order.

Cuxial Chipeo needs no SQL import. It creates its own tables on first start. It does need its items in your inventory.

{% stepper %}
{% step %}

## Check the dependencies

These must be installed and working first:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with a supported framework
* OneSync enabled on the server
* `ox_inventory`, for the items
* A target supported by Cuxial Bridge (`sleepless_interact`, `ox_target` or `qb-target`), for the portable speakers
  {% endstep %}

{% step %}

## Copy the resource

Place the `cuxial_chipeo` folder inside your `resources` directory. Keep the folder name as it is: the items call the resource by that name.
{% endstep %}

{% step %}

## Add the items

The file `install/items.lua` has every item ready for `ox_inventory`. Paste its entries inside the `return { ... }` table of `ox_inventory/data/items.lua`. The `export` line is what makes each item usable.

{% code title="ox\_inventory/data/items.lua" %}

```lua
-- Equipment
['chipeo_radio'] = {
    label = 'Car Audio System',
    weight = 3000,
    stack = false,
    close = true,
    description = 'Sound system ready to install in a vehicle',
    client = { export = 'cuxial_chipeo.chipeo_radio' },
},
['chipeo_unmount'] = {
    label = 'Audio Removal Kit',
    weight = 500,
    stack = false,
    close = true,
    description = 'Removes the sound system from a vehicle',
    client = { export = 'cuxial_chipeo.chipeo_unmount' },
},

-- USB sticks (the number is how many songs fit)
['usb_8']   = { label = 'USB Drive 8 GB',   weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_8' } },
['usb_16']  = { label = 'USB Drive 16 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_16' } },
['usb_32']  = { label = 'USB Drive 32 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_32' } },
['usb_64']  = { label = 'USB Drive 64 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_64' } },
['usb_128'] = { label = 'USB Drive 128 GB', weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_128' } },

-- Repair materials (mechanic.requirements)
['chipeo_amp']       = { label = 'Amplifier',     weight = 1000, stack = true, close = true },
['chipeo_crossover'] = { label = 'Crossover',     weight = 300,  stack = true, close = true },
['chipeo_cables']    = { label = 'Audio Cables',  weight = 200,  stack = true, close = true },
['chipeo_battery']   = { label = 'Audio Battery', weight = 1000, stack = true, close = true },

-- Portable speaker: one item per entry in items.medusas
-- ['my_speaker'] = {
--     label = 'Portable Speaker',
--     weight = 2000,
--     stack = false,
--     close = true,
--     client = { export = 'cuxial_chipeo.my_speaker' },
-- },
```

{% endcode %}

Rules to keep in mind:

* The export is always `cuxial_chipeo.<item name>`, and the item name must match the one in `shared/config.lua` (`items.install`, `items.unmount`, the keys of `items.usb` and the keys of `items.medusas`).
* USB sticks must not stack. Each stick carries its own songs in its metadata.
* Add one item for every entry you put in `items.medusas`, following the commented example at the end.
* The repair materials are plain items. They need no export.

{% hint style="info" %}
Labels, weights and images are yours to choose. The package does not include item images.
{% endhint %}
{% endstep %}

{% step %}

## Provide the speaker props

The resource does not stream any model. Every entry of `items.medusas` in `shared/config.lua` maps an item to a prop name, and that prop must already exist on your server.

The list is empty by default, so there are no portable speakers until you add one. Add an entry for each speaker whose prop you have, and create its item.
{% endstep %}

{% step %}

## Set the staff permission

Staff actions use the framework permission named in `admin.permission` of `shared/config.lua`, `'admin'` by default, checked through Cuxial Bridge. Change the value if your staff use a different permission.

Details in [Commands & permissions](/scripts/vehicles/cuxial-chipeo/commands.md#permissions).
{% endstep %}

{% step %}

## Start the resource

Start it after its dependencies, your framework, the inventory and the target:

{% code title="server.cfg" %}

```cfg
ensure oxmysql
ensure ox_lib
# your framework here
ensure ox_inventory
# your target here
ensure cuxial_bridge
ensure cuxial_chipeo
```

{% endcode %}

Optional: the language follows the `ox:locale` convar. `en` and `es` are included.

{% code title="server.cfg" %}

```cfg
setr ox:locale "en"
```

{% endcode %}

No SQL to run. On start the resource creates `chipeo_installs`, `chipeo_vehicle_damage`, `chipeo_vehicle_usb`, `chipeo_playlists` and `chipeo_eq_presets`, and prints how many installed systems it loaded.
{% endstep %}

{% step %}

## Check that it works

1. Give yourself a `chipeo_radio` and a `usb_8`.
2. Stand next to a vehicle and use `chipeo_radio`. A progress bar runs and the equipment is installed.
3. Get in and press <kbd>F4</kbd>. The head unit opens.
4. Paste a direct `https://` link to an audio file (for example one ending in `.mp3`) and press play. Step out: the music is still heard around the car.
5. Use the `usb_8` while inside. Open the library tab and save a song to the stick.
   {% endstep %}
   {% endstepper %}

Next: adjust the script to your server in [Configuration](/scripts/vehicles/cuxial-chipeo/configuration.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/vehicles/cuxial-chipeo/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
