ue4cli 1.4.28

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ue4cli --version 1.4.28                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local ue4cli --version 1.4.28                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ue4cli&version=1.4.28                
nuke :add-package ue4cli --version 1.4.28                

Command line tools for working with UE4 projects. Full Windows support. Most commands work in OSX (project, plugin, module and code generation) some need improvement (opening project and building from command line is not tested yet) Build and Cook are working in Linux.

Usage: ue4cli <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 - Dump configuration file to the console.
  clean                                         Clean project and plugins from build files.
  code                                          Open Source Code Editor for current project.
  convert                                       Convert copied clipboard data to json file.
  cook [Config] [--dump]                        Cook project with cook settings. --dump - Dump configuration file to the console.
  create_config                                 Create new or update old template config in current project or module.
  diff <LeftFile> <RightFile>                   Launch UE4 diff tool to diff two files.
  editor                                        Open UE4 Editor for current project.
  generate                                      Generate Source Code Solution for current project.
  get_ue_root                                   Get UE root of associated UE 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 UE4 diff tool to merge conflict file.
  merge_lfs <File>                              Launch UE4 diff tool to merge conflict file. Works for Git LFS conflict files.
  pch_cleanup                                   Cleanup PCH file errors sometime generated by Visual Studio - fatal error C1853
  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 ue4cli tool version.

Setup tool

ue4cli tool can be easely installed from nuget with dotnet tool install -g ue4cli command (will install globally). And updated with dotnet tool update -g ue4cli command.

Source generation commands.

Two types of add commands:

  1. Plugin/Module generation - create code plugin or module with minimal required files. add plugin - generate plugin in Plugins/name folder and add it to .uproject file. add module - generate module in current folder.
  2. Source generation - add bpfl, add class, add dataasset, add interface, add tablerow - automaticaly add source and header files based on current directory and source folder structure (headers are put to Public, source files are put to Private if these folders exist).

Management commands.

Various commands usefull in day to day work. They can be used form any path inside project folder tree.

  1. generate - regenerate solution and project files.
  2. code - open code editor (can autogenertate project if set by config, default off)
  3. editor - open Unreal Engine editor (can autobuild project if set by config, default off)

Build/Cook commands.

  1. build and cook commands are supplied with json configuration file. json configuration file can be generated with ue4cli build --dump command. Json config contains various flags passed to BuildCookRun RunAU command.
[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;
  • StringParameter - adds -param={value} if field is not null or empty.
  • BoolParameter - adds -param or -noparam (or none) if enbaled or disabled.
  • StringListParameter - adds -param={v1}+{v2}+...+{vn} if not null or mepty.

Build/Cook source engine build update checking

When building from source it is requrede to run Setup.bat or Setup.sh on first build or after Unreal Engine version upgrade. That step is automated in build/cook commands. Fot this automation to work, create .ue.basecommit file in UnrealEngine roou folder (where Setup.bat is located). I prefer to store git commit hash in that file. That file should be touched or updated every time Unreal Engine version is upgraded. Then on build step it's timestamp is compared to .ue4dependencies timestemp, and if it is newer or .ue4dependencies does not exist then Setup.bat or Setup.sh is run automaticaly.

Config commands.

  1. create_config - create .ue4a config file inside Project or Module folder. Different configs for each type. Run this command to create local config file.
  • Project:
{
	"UE4RootPath": "<path to UE Efitro (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: these options are passed directly 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.
}

Blueprint Diff/Merge commands.

Thesee commands run project assosiated Unreal Engine in diff or merge mode. Can be used form source control tools. How and if Merge works in unknown. Diff is only usefull to me.

  1. diff - run diff mode.
  2. merge - run merge mode. Diff command have special flags for use from plastic SCM. Needed to guess project folder correctly.

Plastic SCM diff/merge command.

  1. diff - ue4cli diff "@sourcefile" "@destinationfile" -plastic-source "@sourcesymbolic" -plastic-destination "@destinationsymbolic"
  2. merge - ue4cli merge "@basefile" "@destinationfile" "@sourcefile" "@output"

Engine UUID manipulation commands.

When working with source engine build it cna be usefull to set one UUID for engine association across all developer computers. That can be easely done with ue4cli uuid set {1842737E-4FB8-4CF3-A097-AD89D06349D8}

  1. uuid list - list registered Unreal Engine uuid identifiers.
  2. uuid set <GUID> - set project's Unreal Engine uuid identifier for current folder.
  3. uuid show - show projects uuid.

Other commands.

  1. log command cnab used to open either project or build (engine) log folder.
  2. pch_cleanup command will scan build logs and find .pch complaints and delete that files (fatal error C1853). Should be run after failed build.
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.5.6 835 7/11/2022
1.5.5 395 7/7/2022
1.5.4 405 7/6/2022
1.5.2 447 7/2/2022
1.5.1 411 7/2/2022
1.5.0 420 7/2/2022
1.4.32 439 6/28/2022
1.4.30 402 6/22/2022
1.4.28 388 6/16/2022
1.4.27 456 6/1/2022
1.4.26 428 5/31/2022
1.4.25 410 5/30/2022
1.4.24 463 5/16/2022
1.4.21 485 4/21/2022
1.4.20 456 4/5/2022
1.4.19 473 3/12/2022
1.4.18 406 3/11/2022
1.4.17 408 3/10/2022
1.4.16 406 3/10/2022
1.4.15 404 3/10/2022
1.4.12 419 3/7/2022
1.4.11 409 3/6/2022
1.4.9 437 3/4/2022
1.4.8 419 3/4/2022
1.4.7 416 3/4/2022
1.4.6 407 3/4/2022
1.4.5 418 3/3/2022
1.4.4 407 3/3/2022
1.4.3 418 3/3/2022
1.4.2 421 2/27/2022
1.4.1 424 2/24/2022
1.4.0 427 2/17/2022
1.3.9 416 2/17/2022
1.3.8 436 2/11/2022
1.3.7 426 2/11/2022
1.3.6 430 2/11/2022
1.3.5 419 2/11/2022
1.3.4 442 2/11/2022
1.3.3 435 2/11/2022
1.3.2 425 2/11/2022
1.3.1 421 2/11/2022
1.3.0 433 2/11/2022