Command line tools for working with Unreal Engine projects.
- Full Windows support.
- Most project, plugin, module, and code-generation commands work on macOS, but opening projects and command-line builds need more validation.
- Build and cook commands work on Linux.
Usage: uecli <Command>
Commands:
add module <Name> Add new module to current project or plugin.
add plugin <Name> Create and add new plugin to current project.
add bpfl [Name] Add a function library to current module, if one does not exist.
add class <Name> <BaseType> Add new class to current module.
add dataasset <Name> Add a data asset class with given name.
add interface <Name> Add new interface to current module.
add project <Name> [Deprecated] Create new project.
add tablerow <Name> Add a data table row struct with given name.
build [Config] [--dump] Build project. --dump dumps configuration to the console.
clean Clean project and plugins from build files.
code Open source code editor for current project.
config get [File] [Section] [Key] Get value from config file.
config set [File] [Section] [Key] <Value> Set value in config file. Value can be piped through stdin.
convert Convert copied clipboard data to JSON.
cook [Config] [--dump] Cook project with cook settings. --dump dumps configuration to the console.
create_config Create new or update old template config in current project or module.
diff <LeftFile> <RightFile> Launch Unreal diff tool to diff two files.
editor Open Unreal Editor for current project.
fix all Fix all possible known errors.
fix dll_load Fix `Failed to load dll` errors.
fix pch_cleanup Clean up PCH file errors.
generate Generate source code solution for current project.
get_ue_root Get UE root of associated Unreal Engine build.
help Display help.
init [Deprecated] Initialize working environment, create Libraries.sln.
log build Open build log folder.
log project Open project log folder.
merge [Base] [Local] [Remote] [Result] Launch Unreal diff tool to merge conflict file.
merge_lfs <File> Launch Unreal diff tool to merge Git LFS conflict file.
protect Mark Unreal Engine source files as read-only.
run <Commandlet> [parameters] Run commandlet.
uuid list List registered Unreal Engine UUID identifiers.
uuid set <GUID> Set project's Unreal Engine UUID identifier.
uuid show Show project's Unreal Engine UUID identifier.
version Display uecli tool version.
Install the tool from NuGet:
dotnet tool install --global uecliUpdate it with:
dotnet tool update --global uecliSee BUILD.md for prerequisites, submodule setup, restore, build, test, and pack commands.
There are two types of add commands:
- Plugin/module generation creates code plugins or modules with minimal required files.
add plugingenerates a plugin in thePlugins/<Name>folder and adds it to the.uprojectfile. If the plugin already exists, the command only adds it to the project. This works only for local plugins.add modulegenerates a module in the current folder. It adds the module to.uprojector.uplugin, but does not add it to.Build.csscripts.
- Source generation commands (
add bpfl,add class,add dataasset,add interface,add tablerow) automatically add source and header files based on the current directory and source folder structure. Headers are placed inPublic, and source files are placed inPrivatewhen those folders exist.
Useful day-to-day commands can be run from any path inside a project folder tree.
generateregenerates solution and project files.codeopens the code editor and can auto-generate the project if configured. This is off by default.editoropens Unreal Editor and can auto-build the project if configured. This is off by default.
build and cook commands use JSON configuration files. A build configuration can be generated with:
uecli build --dumpBoth commands check for .ue.needsetup in a source engine root or compare the timestamp of .ue.basecommit with .ue4dependencies. If setup is required, Setup.bat or Setup.sh is run automatically. This helps automate engine recompilation after version upgrades.
If build is run in an Unreal Engine source folder, it builds the engine from source. It uses UAT to build "Build Tools" first, then uses UBT to build the editor target.
When building from source, Setup.bat or Setup.sh must be run on the first build or after an Unreal Engine version upgrade. To automate this step, create a .ue.basecommit file in the Unreal Engine root folder where Setup.bat is located. Store the engine commit hash or another marker in that file and update its timestamp whenever the engine version changes. During build, its timestamp is compared to .ue4dependencies; if it is newer or .ue4dependencies does not exist, setup is run automatically.
create_config creates a .ue4a config file inside a project or module folder.
Project config:
{
"UE4RootPath": "<path to UE Editor (for source builds) null for store builds.>",
"GenerateProject": { // should run generate command on these commands
"onAddItem": true, // add *
"onCode": true, // code
"onEditor": false, // editor
"onBuild": false, // build
"onCook": false // cook
},
"InterfaceSuffix": "Interface", // suffix added to `add interface` type names
"FunctionLibrarySuffix": "Statics", // suffix added to `add bpfl` type names
"DefaultBuildConfigurationFile": "Build.json", // default configuration for `build` command
"DefaultCookConfigurationFile": "Cook.json", // default configuration for `cook` command
"JsonIndentation": { // json formatting options for generated files.
"IndentationChar": "\t",
"IndentationLevel": 1
}
}Module config options are passed directly to source code templates:
{
"pchHeader": null, // should generate PCH include string, and pch name.
"finalHeader": "MyProject.final.h", // should generate final include header in source files, and it's name.
"locTextNamespaceName": "MyProject" // should generate LOCTEXT_NAMESPACE define/undef pair and it's value.
}These commands run the project-associated Unreal Engine in diff or merge mode. They can be used from source control tools. Diff is the most commonly used workflow; merge support depends on Unreal Engine behavior.
diffruns diff mode.mergeruns merge mode.
uecli diff "@sourcefile" "@destinationfile" -plastic-source "@sourcesymbolic" -plastic-destination "@destinationsymbolic"
uecli merge "@basefile" "@destinationfile" "@sourcefile" "@output"When working with source engine builds, it can be useful to set one UUID for engine association across all developer computers:
uecli uuid set {1842737E-4FB8-4CF3-A097-AD89D06349D8}uuid listlists registered Unreal Engine UUID identifiers.uuid set <GUID>sets the project's Unreal Engine UUID identifier for the current folder. It can be run without a GUID to use an auto-generated GUID. If run in an engine folder, it registers the engine instance or sets the engine GUID.uuid showshows the project's UUID.
logopens either the project log folder or build log folder.fix pch_cleanupscans build logs for.pchcomplaints and deletes those files after fatal error C1853.fix dll_loadscans run logs for failed DLL loads and deletes those DLLs.fix allapplies all fixes.
[StringParameter("project")] public string ProjectFullPath = null;
[StringParameter("target")] public string Target = null;
[StringParameter("platform")] public string Platform = DefaultPlatformName;
[StringParameter("cookflavor")] public string CookFlavor = null;
[StringParameter("clientconfig")] public string ClientConfig;
[StringParameter("serverconfig")] public string ServerConfig;
[StringParameter("ddc")] public string DDC;
[BoolParameter("skipbuildeditor")] public bool? SkipBuildEditor = null;
[BoolParameter("P4", "noP4")] public bool? UseP4 = null;
[BoolParameter("cook")] public bool? Cook = null;
[BoolParameter("allmaps")] public bool? AllMaps = null;
[BoolParameter("client", "noclient")] public bool? Client = null;
[BoolParameter("server", "noserver")] public bool? Server = null;
[BoolParameter("build")] public bool? Build = null;
[BoolParameter("stage")] public bool? Stage = null;
[BoolParameter("pak")] public bool? Pak = null;
[BoolParameter("archive")] public bool? Archive = null;
[BoolParameter("package")] public bool? Package = null;
[BoolParameter("compressed")] public bool? Compressed = null;
[BoolParameter("NoXGE")] public bool? NoXGE = null;
[BoolParameter("NoFASTBuild")] public bool? NoFASTBuild = null;
[BoolParameter("utf8output")] public bool? Utf8Output = null;
[BoolParameter("unversionedcookedcontent")] public bool? UnversionedCookedContent = null;
[BoolParameter("generatepatch")] public bool? GeneratePatch = null;
[StringParameter("createreleaseversion")] public string CreateReleaseVersion;
[StringParameter("basedonreleaseversion")] public string BasedOnReleaseVersion;
[StringParameter("archivedirectory")] public string ArchiveDirectory;
[StringListParameter("map")] public string[] Maps;
[StringListParameter("CookCultures")] public string[] CookCultures;StringParameteradds-param={value}if the field is not null or empty.BoolParameteradds-param,-noparam, or nothing if enabled, disabled, or unset.StringListParameteradds-param={v1}+{v2}+...+{vn}if not null or empty.