create-fivem
A quick way to bootstrap a FiveM script using TypeScript, JavaScript, or Lua—complete with a pre-configured compiler.
Overview
create-fivem is a simple CLI tool that scaffolds a new FiveM script with zero setup. It supports TypeScript, JavaScript, and Lua, and comes pre-configured with the
@whitigol/fivem-compiler for seamless development and deployment.
Features
- Preconfigured with
@whitigol/fivem-compiler - Choose TypeScript, JavaScript, or Lua
- Ready-to-use project structure
- Works with Pnpm, Bun, npm, and Yarn
Requirements
Before you begin, make sure you have:
- Node.js 18 or newer
- A Node.js package manager installed (Pnpm, Bun, npm, or Yarn)
Installation
Run the command using your preferred package manager:
npm create fivem@latestCLI Prompts
Once the command runs, you’ll be prompted to select:
- Option to initialize a Git repository for version control
- Choose your programming language:
- TypeScript
- JavaScript
- Lua
- Specify the resource details:
- Name
- Author
- Description
- Version
- Decide whether to include NUI (in-game UI):
- If yes:
- Select UI framework (React, Vue, or plain HTML)
- Choose UI language (TypeScript or JavaScript)
- If no:
- NUI will not be included in the project
- If yes:
You can cancel at any time with Ctrl+C. Your file system will remain unchanged until all prompts are answered.
Output Structure
Here’s what a full-featured TypeScript project looks like:
PROJECT ROOT/
├─ node_modules/
├─ src/
│ ├─ client/
│ │ └─ index.ts
│ ├─ server/
│ │ └─ index.ts
│ └─ fxmanifest.lua
├─ package.json
├─ ts.wfm
├─ wfm.config.tsEverything is already wired up to work with the compiler—just run pnpm dev, bun dev, npm run dev, or yarn dev.
Next Steps
After generating your script:
- Open the project directory.
- Start the dev server with your package manager (
pnpm dev,bun dev,npm run dev, oryarn dev). - Begin scripting immediately—everything is already set up.
@whitigol/fivem-compiler.Last updated: Unknown