AI Script Installer
Installing a FiveM resource by hand means reading the README, running the SQL, editing server.cfg, registering jobs and items in your framework, and chasing down dependencies. The AI Script Installer reads the resource, plans that work as a set of reviewable actions, and shows you exactly what it will change before it changes anything.
How it works
Section titled “How it works”Add a resource, from the marketplace or by dropping a folder or archive onto the installer, and CfxKit moves through five states: uploading, analyzing, preview, installing, done. The AI analysis streams in while it reads the resource and detects your framework (ESX, QBCore, QBox, VORP, RSG, or standalone).
When analysis finishes you land on the review screen, a two-column preview:
- Left, the plan. A verdict, what the script does, the Setup Actions CfxKit will run, plus integration notes and recommendations.
- Right, the evidence. The resource’s dependencies pinned at the top, then tabs for Files, SQL, Config, and Security.
Nothing is written to disk or your database until you choose to apply.
The verdict
Section titled “The verdict”Every analysis ends with one of three verdicts, shown at the top of the plan:
| Verdict | Meaning |
|---|---|
| Ready to Install | No blockers. Apply whenever you want. |
| Review Before Installing | Works, but read the warnings first (missing dependency, destructive SQL). |
| Cannot Install | A blocker (for example a failed security scan). Resolve it before installing. |
Setup actions
Section titled “Setup actions”A setup action is one reviewable change. CfxKit plans them as typed actions, each with a title and a short rationale:
| Type | What it does |
|---|---|
job-register | Registers jobs and their grades in your framework. |
item-register | Adds items to your framework’s item list. |
config-edit | Sets values in a resource config (for example config.lua). |
sql-run | Runs the resource’s SQL against your connected database. |
manual | A step CfxKit cannot automate, with a link or instructions. |
Actions carry flags: required ones block the install until they are handled, and destructive ones (any sql-run) ask for confirmation before they touch your database.
Choose how much CfxKit does for you with the mode switch:
- Plan preview and apply each action yourself.
- Run All run everything in order, pausing on destructive steps.
- Auto run the safe actions, skip the destructive ones.
Each row moves through Reviewed, Running…, then Applied, Skipped, or Failed, and the header keeps a running count like 2/5 done · 3 auto. If the resource needs nothing, you will see Everything's already configured and can install straight away.
Example: esx_ambulancejob
Section titled “Example: esx_ambulancejob”For the classic ESX ambulance job, CfxKit detects ESX and plans three actions:
job-registertheambulancejob (labelEMS) with its 4 grades: Jr. EMT, EMT, Sr. EMT, EMT Supervisor.item-registerthe usable itemsmedikitandbandage.sql-runthe rest: thesociety_ambulanceaccounts and theisDeadcolumn onusers.
Files, SQL, Config, Security
Section titled “Files, SQL, Config, Security”The right column is the evidence behind the plan. Dependencies stay pinned at the top, with anything missing flagged (the ambulance job needs es_extended and oxmysql). Below that:
- Files the resource files that will be copied into
resources/. - SQL every statement, in full, so you can read it before it runs.
- Config the config values CfxKit will set.
- Security the result of the static scan that can move the verdict to Cannot Install.
The SQL tab shows exactly what sql-run will execute (abbreviated here):
-- job-register: the ambulance job and its gradesINSERT INTO `jobs` (name, label) VALUES ('ambulance', 'EMS');
INSERT INTO `job_grades` (job_name, grade, name, label, salary) VALUES ('ambulance', 0, 'ambulance', 'Jr. EMT', 20), ('ambulance', 1, 'doctor', 'EMT', 40), ('ambulance', 2, 'chief_doctor', 'Sr. EMT', 60), ('ambulance', 3, 'boss', 'EMT Supervisor', 80);
-- item-register: usable itemsINSERT INTO `items` (name, label, `limit`) VALUES ('bandage', 'Bandage', 20), ('medikit', 'Medikit', 5);
-- sql-run: society account and dead-state columnINSERT INTO `addon_account` (name, label, shared) VALUES ('society_ambulance', 'EMS', 1);ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0';And the server.cfg change is shown as a diff before it is written:
ensure es_extendedensure oxmysqlensure esx_ambulancejobApplying, backups, and revert
Section titled “Applying, backups, and revert”When you install, CfxKit runs a fixed pipeline and reports each step:
- Backup existing resource snapshot anything it is about to overwrite.
- Copy resource files write the resource into
resources/. - Execute SQL files run the approved SQL.
- Update server.cfg add the
ensureline. - Finalizing confirm the result.
Every file CfxKit writes is snapshotted for the session, so a successful action shows a Revert that restores the previous file.
Supported frameworks
Section titled “Supported frameworks”The installer understands the conventions of ESX, QBCore, QBox, VORP, and RSG, and falls back to Standalone for resources with no framework dependency (it still handles their files, SQL, and server.cfg). The detected framework appears in the review header alongside the file count and size, for example ESX · 42 files · 1.2 MB.
- Keep
.cfxkit/rules.mdcurrent. The planner reads your project rules, so noting your framework and conventions sharpens the plan. - Check the Dependencies and Security panels before installing. A missing dependency or a failed scan is what moves a verdict off Ready to Install.
- Use Plan mode on a production server so you apply each change deliberately. Run All is for resources you already trust.