Skip to content

Command line & CI

The TACraftwright commandlet runs the checks without opening the editor UI. Use it in build scripts and CI to keep a recipe report up to date and to fail the build when findings reach a given severity, for example when someone adds a recipe chain that duplicates items. It can also import a recipe table first.

UnrealEditor-Cmd.exe Project.uproject -run=TACraftwright [-Paths=/Game/A+/Game/B] [-Report=Saved/Craftwright/Reports] [-Formats=html,csv,json] [-NoReport] [-FailOn=Error|Warning|Info|Never] [-Import=Recipes.csv [-DryRun] [-NewFolder=/Game/Recipes]]

Example:

Terminal window
UnrealEditor-Cmd.exe "C:\Path\MyGame.uproject" -run=TACraftwright -Paths=/Game/Crafting -Report=Docs/RecipeReport -FailOn=Warning -unattended -nop4 -nosplash -NullRHI

-unattended, -nop4, -nosplash and -NullRHI are standard Unreal command line options for headless runs. They are not specific to Craftwright.

Parameter Default Meaning
-Paths=/Game/A+/Game/B Scan Folders from the settings (/Game when empty) Content folders to scan, including subfolders. Separate several folders with + or ,.
-Report=<folder> Report Directory from the settings (Saved/Craftwright/Reports) Folder for the report files. Relative paths start at the project folder.
-Formats=html,csv,json All three Comma-separated list of html, csv and json, case-insensitive. csv writes both the recipes and the items CSV.
-NoReport Off Writes no report. The findings are still logged and still decide the exit code.
-FailOn=<severity> Error Lowest severity that fails the run: Error, Warning, Info (also Suggestion) or Never (also None). Case-insensitive.
-Import=<file> None A .csv or .json recipe table to import before the scan. Use a full path.
-DryRun Off With -Import: logs what the import would create and change, without changing anything.
-NewFolder=<path> New Recipe Folder from the settings (/Game/Craftwright/Recipes) With -Import: where new recipes are created and rows without a path are looked up.

The checks themselves follow Project Settings > Plugins > ta Craftwright (for example Warn Recipes Not In Book). See Settings.

  1. Reads -FailOn and the folders to scan.
  2. Waits for the Asset Registry to finish discovering all assets.
  3. With -Import: imports the file (or only previews it with -DryRun) and logs every change.
  4. Scans the folders and logs one line per finding.
  5. Writes the report, unless -NoReport is given.
  6. Logs a summary line and exits with an exit code.

Importing before the scan means the report and the exit code reflect the recipes after the import.

All lines are logged in the LogTACraftwright category:

LogTACraftwright: Display: Scanning /Game/Crafting
LogTACraftwright: Display: [Error] Duplication loop | /Game/Crafting/Recipe_IronIngot.Recipe_IronIngot | Crafting loop Item_IronOre -> Item_IronIngot -> Item_IronOre gives x1.50 per round, so players can make endless items (recipes: Recipe_IronIngot, Recipe_ScrapIngot).
LogTACraftwright: Display: [Warning] Not in a recipe book | /Game/Crafting/Recipe_Lantern.Recipe_Lantern | Is in no recipe book, so no crafter can use it.
LogTACraftwright: Display: [Suggestion] Item without icon | /Game/Crafting/Items/Item_Nails.Item_Nails | Has no icon for the crafting UI.
LogTACraftwright: Display: Report written: C:/Path/MyGame/Saved/Craftwright/Reports/Craftwright_20261013_101500.html
LogTACraftwright: Display: Report written: C:/Path/MyGame/Saved/Craftwright/Reports/Craftwright_20261013_101500.json
LogTACraftwright: Display: Report written: C:/Path/MyGame/Saved/Craftwright/Reports/Craftwright_20261013_101500_recipes.csv
LogTACraftwright: Display: Report written: C:/Path/MyGame/Saved/Craftwright/Reports/Craftwright_20261013_101500_items.csv
LogTACraftwright: Display: ta Craftwright: 12 recipe(s), 17 item(s), 2 book(s). 1 error(s), 1 warning(s), 1 suggestion(s). 1 finding(s) at or above -FailOn=Error.
  • Scanning lists the scanned folders.
  • Each finding line has the format [<Severity>] <Check name> | <Object path> | <Message>. The severity is Error, Warning or Suggestion. See Checks.
  • Report written gives the full path of every file written. It is not logged with -NoReport.
  • The summary line gives the number of recipes, items and books, the findings per severity and how many findings are at or above -FailOn.

With -Import, the import is logged before the scan:

LogTACraftwright: Display: [Import] Update Recipe_Planks: CraftTime
LogTACraftwright: Display: [Import] Create /Game/Craftwright/Recipes/Recipe_Lantern.Recipe_Lantern
LogTACraftwright: Error: [Import] Line 5 (Recipe_Torch): Unknown item "Item_Wick".
LogTACraftwright: Display: Import: 1 created, 1 updated, 8 unchanged, 1 error(s).

With -DryRun the lines start with [Import dry run] and the summary with Import (dry run):. See Errors for the import messages.

Setup and report errors are logged as errors:

Unknown -FailOn value '<value>'. Use Error, Warning, Info or Never.
The ta Craftwright editor subsystem is not available.
Could not write the report.
Code Meaning
0 Passed: no findings at or above -FailOn. With -FailOn=Never the run always passes unless there is an error below.
1 At least one finding at or above -FailOn.
2 The run itself failed: unknown -FailOn value, the editor subsystem is not available, the import reported an error (a file problem or a skipped row), or no report file could be written (for example a -Formats list without html, csv or json).

Parameters the commandlet doesn’t know are ignored.

With the default -FailOn=Error, the run fails on duplication loops, recipes without outputs, empty outputs and ingredients, and discovered recipes without ingredients. Use -FailOn=Warning to also fail on tags no item has, outputs with a 0 % chance, free recipes, recipes that always fail, recipes in no book, and empty books, entries, conditions and effects.

This Windows batch step checks the recipes, writes the report, keeps the exit code and passes it on to the build system. It expects to be placed next to MyGame.uproject; adjust the engine path and project name for your setup.

ci_recipe_check.bat
@echo off
set UE_CMD="C:\Program Files\Epic Games\UE_5.6\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"
set PROJECT="%~dp0MyGame.uproject"
%UE_CMD% %PROJECT% -run=TACraftwright -Report=Docs/RecipeReport -FailOn=Warning -unattended -nop4 -nosplash -NullRHI
set RESULT=%ERRORLEVEL%
if %RESULT%==0 echo Craftwright: passed
if %RESULT%==1 echo Craftwright: findings at or above -FailOn, see Docs\RecipeReport
if %RESULT%==2 echo Craftwright: setup, import or report error, check the log
exit /b %RESULT%

Archive the Docs/RecipeReport folder as a build artifact. The report files are named after the time of the scan (Craftwright_<date>_<time>.html and so on), so every run adds new files; clean the folder before the run if you only want the latest. The JSON file has every finding with its ruleId, severity, assetPath and message for your own checks or dashboards.

To balance recipes from a spreadsheet in CI, preview the import in the check job and apply it in a separate job:

Terminal window
%UE_CMD% %PROJECT% -run=TACraftwright -Import="%~dp0Balance\recipes.csv" -DryRun -NoReport -unattended -nop4 -nosplash -NullRHI

Windows PowerShell 5.1 changes some arguments that start with - before Unreal sees them:

  • An argument with a dot is split in two at the dot, so -Import=C:\Balance\recipes.csv or -Report=Docs/v1.2 is cut.
  • An argument with a comma, such as -Formats=html,csv,json, makes PowerShell stop with the parse error “Missing argument in parameter list”.

Put such arguments in quotes or in a variable:

Terminal window
$UE = "C:\Program Files\Epic Games\UE_5.6\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"
$Project = "C:\Path\MyGame.uproject"
$Formats = "-Formats=html,json"
$Import = "-Import=C:\Path\Balance\recipes.csv"
& $UE $Project -run=TACraftwright $Import -DryRun $Formats -FailOn=Warning -unattended -nop4 -nosplash -NullRHI
exit $LASTEXITCODE

Separating -Paths folders with + instead of , avoids the comma problem.