Skip to content

Commands

m4bwav edited this page Nov 21, 2026 · 2 revisions

All commands run as python skills/modwright/scripts/mw.py <command>. The examples ran inside the repository's evals/fixtures folder at v0.1.0, on Windows. Every command except scan prints JSON; scan prints key: value lines unless you pass --json. Exit codes are on Exit codes and errors.

scan

mw.py scan <install> [--json]

Identifies the engine, runtime, anti-cheat and installed loaders. Exits 2 when anti-cheat is found.

python ../../skills/modwright/scripts/mw.py scan arena
engine: Unity
runtime: IL2CPP
anticheat: ['Easy Anti-Cheat']
loaders_installed: []
recommended_loader: BepInEx 6 (or MelonLoader)
loader_logs: []
notes: ['Anti-cheat present: stop. No injection or memory patching; only official mod routes, single-player or offline.', 'No mod loader installed yet. Back up saves before installing one.']

--json prints the same fields plus install, as JSON.

backup

mw.py backup <out> <path>... [--build ID]

Copies each file or folder into <out>/files/<n>/ and writes <out>/manifest.json with each file's SHA-256 and size, the source paths and the optional game build id. <out> must be empty or missing.

python ../../skills/modwright/scripts/mw.py backup bk farm/saves --build 123456
{
  "backup": "bk",
  "files": 1,
  "build": "123456"
}

restore

mw.py restore <backup> [--verify]

Checks each backed-up copy against its hash (corrupt_in_backup), lists live files that differ from the backup (live_differs, absolute paths) and copies them back. --verify only reports, and exits 1 when anything differs. After one byte was appended to the save:

python ../../skills/modwright/scripts/mw.py restore bk --verify
{
  "backup_ok": true,
  "corrupt_in_backup": [],
  "live_differs": [
    "<scratch>/evals/fixtures/farm/saves/slot1.sav"
  ],
  "restored": 0,
  "build": "123456"
}

Without --verify the same run reports "restored": 1 and exits 0.

proof

mw.py proof <install> --mod NAME [--log FILE]

Searches the loader logs it finds under the install (BepInEx/LogOutput.log, MelonLoader/Latest.log, UnityModManager/Log.txt, ue4ss/UE4SS.log, UE4SS.log, Mods/mods.log, logs/latest.log), or only the file given with --log, for lines naming the mod. Verdicts: loaded (exit 0); errored, not-seen and no-log (exit 1). A log last modified over 24 hours ago adds a note saying so.

python ../../skills/modwright/scripts/mw.py proof farm --mod FastHarvest
{
  "mod": "FastHarvest",
  "verdict": "loaded",
  "logs": [
    "farm\\BepInEx\\LogOutput.log"
  ],
  "load_lines": [
    "[Info   :   BepInEx] Loading [FastHarvest 1.0.0]"
  ],
  "error_lines": [],
  "log_age_hours": 0.0
}

The logs path uses the OS separator. A mod whose load error is logged:

python ../../skills/modwright/scripts/mw.py proof farm --mod MoreSeeds
  "verdict": "errored",

publish-prep

mw.py publish-prep workshop|thunderstore <folder> [--appid N] [--item ID] [--preview FILE]
    [--visibility N] [--title T] [--description D] [--changenote C] [--version X.Y.Z]
    [--url URL] [--dep DEPENDENCY]...

Writes the upload file and prints the next command. It never uploads.

  • workshop needs --appid and --changenote. It writes <folder>.workshop.vdf next to the folder, not inside it. --item updates an existing item (default 0, a new one).
  • thunderstore needs --version as MAJOR.MINOR.PATCH. The name is --title or the folder name, letters, digits and underscore only. It writes <folder>/manifest.json and lists a missing icon.png or README.md. --dep repeats; --description is cut to 250 characters.
python ../../skills/modwright/scripts/mw.py publish-prep thunderstore mymod --version 1.0.0 --title CoolMod

The written manifest.json:

{
  "name": "CoolMod",
  "version_number": "1.0.0",
  "website_url": "",
  "description": "",
  "dependencies": []
}

Without --visibility the VDF holds "visibility" "2" (private). 0.1.0 wrote "None" here; see FAQ.

Clone this wiki locally