CLI Reference
ModKit includes a CLI commandlet (ModKitBuild) for automating builds in CI/CD pipelines or scripting environments — no Editor GUI required.
Basic Usage
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild <subcommand> [options]
Replace UnrealEditor-Cmd.exe with the full path to your UE installation's commandlet executable.
Subcommands
new — Create a Mod
Create a new mod project from the CLI.
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild new \
--modid=my_mod \
--name="My Mod" \
--author="YourName"
| Option | Required | Default | Description |
|---|---|---|---|
--modid | ✅ | — | Unique mod identifier (lowercase, underscores) |
--name | — | Derived from ModId | Display name |
--author | — | Unknown | Author name |
The mod is created at {ProjectDir}/Plugins/{ModId}/. Remaining fields (version, min/max game
version, tags) take defaults and can be edited afterward via ModDescriptor.json or the Edit Mod window.
Exit codes: 0 = success, 1 = error
validate — Validate a Mod
Validate a mod without building.
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild validate \
--mod=/path/to/Plugins/my_mod
| Option | Required | Description |
|---|---|---|
--mod | ✅ | Path to the mod plugin folder |
Runs the same validation as the UI (descriptor check, hard references, Blueprint compile errors).
Exit codes: 0 = valid, 1 = validation errors found
build — Build a Mod to PAK
Cook and package a mod.
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild build \
--mod=/path/to/Plugins/my_mod \
--platform=Windows \
--output=/path/to/output
| Option | Required | Default | Description |
|---|---|---|---|
--mod | ✅ | — | Path to the mod plugin folder |
--platform | — | Windows | Target platform: Windows, Mac, Linux |
--output | — | {ProjectDir}/Saved/ModKitOutput | Output directory for the .pak file |
--compress | — | true | Enable Oodle compression |
Output file: {output}/{modid}_{platform}.pak
Exit codes: 0 = success, 1 = build failed
list — List Mods in a Game Directory
List all .pak files in a game's Mods directory.
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild list \
--game=/path/to/game
| Option | Required | Description |
|---|---|---|
--game | ✅ | Path to the game installation directory |
Outputs a list of discovered .pak files and their ModId / Version if ModDescriptor.json is embedded.
Exit codes: 0 = success, 1 = game directory not found
CI/CD Example
GitHub Actions workflow to build and validate a mod on every push:
name: Build Mod
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Validate
run: |
& "C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" `
"${{ github.workspace }}\MyModWorkspace.uproject" `
-run=ModKitBuild validate `
--mod="${{ github.workspace }}\Plugins\my_mod"
- name: Build
run: |
& "C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" `
"${{ github.workspace }}\MyModWorkspace.uproject" `
-run=ModKitBuild build `
--mod="${{ github.workspace }}\Plugins\my_mod" `
--output="${{ github.workspace }}\output"
- name: Upload PAK
uses: actions/upload-artifact@v3
with:
name: my_mod
path: output/*.pak
Logging
All CLI output uses structured log categories:
| Category | Content |
|---|---|
LogModKitCLI | Commandlet execution, subcommand routing |
LogModKitBuild | Cook, PAK, pipeline stages |
LogModKitValidator | Validation results |
Add -log to the command line for full verbose output:
UnrealEditor-Cmd.exe MyProject.uproject -run=ModKitBuild build --mod=... -log