ModSync/For guide authors/CLI reference

CLI reference

Every command and option of the modsync command line, grouped by the job you are doing. For a short overview, read Command line. Run modsync --help or modsync <command> --help to see the same list in your terminal.

Global options and conventions

These options work with any command. Put them before the command name, for example modsync -v validate ....

OptionWhat it does
-v, --verboseAdds diagnostic log lines on stderr. Structured output on stdout stays the same, so scripts are not affected.
--plaintextUses plain text progress output. This is already the default for the command line.
-h, --helpShows help for the command you name, or for everything when no command is given.
-V, --versionPrints the version number.

Running modsync with no command opens the desktop app, the same as modsync gui.

Exit codes

CodeMeaning
0The command finished and succeeded.
1The command failed. A message starting with Error: is printed on stderr. A validation report that does not pass also exits with 1.
130The command was cancelled, for example with Ctrl+C. Maintenance that was cancelled and rolled back also uses 130.

modsync holopatcher passes the exit code of the patcher backend it ran.

Output formats

  • Most commands print plain text by default.
  • Commands with --json print one JSON document. Some print a single pretty-printed document, and some print one JSON event per line (called newline-delimited JSON). Each command's section says which.
  • install --install-progress-json prints typed progress lines on stdout. The last line has "phase": "completed" on success.

Hidden options. A few options exist only for testing and do not appear in --help. They are not documented here, and you do not need them.

Installing

These commands read a guide, check it against your game and mod folders, and install it. Most of them share the same set of options. Start with list and validate before you run install.

list

Lists the components in a guide, with their download links, as JSON.

modsync list <input>
ArgumentValueWhat it doesDefault
<input>fileThe guide to read. Required.None

Example:

modsync list KOTOR1_Full.toml

selection

Prints the components and options that would be selected, without downloading or installing anything.

modsync selection --input <guide> [--game-dir <folder>] [--source-dir <folder>] [selection options] [--json]
OptionValueWhat it doesDefault
-i, --inputfileThe guide. Required.None
-g, --game-dirfolderYour game folder. Lets ModSync apply the Aspyr-only rules. Without it, those rules are only reported.None
--source-dirfolderYour mod folder. Inspects the local archives the same way the desktop app does. Needs --game-dir.None
--use-file-selectionnoneUses the IsSelected values in the guide.Off. All top-level components are selected.
--selectname, GUID, category:Name or tier:NameSelects components. Repeat the flag, or list several values after one flag.None
--optionGUIDTurns on an option and its parent mod. Repeat for more options.None
--deselectname or GUIDRemoves a mod. Mods that depend on it are removed too. Repeatable.None
--deselect-optionGUIDRemoves an option. Anything that depends on it is removed too. Repeatable.None
--select-through-tiertierAdds base mods in that tier and every higher tier. Repeatable.None
--add-categorycategoryAdds base mods in that category. Ignores upper and lower case. Repeatable.None
--select-visible-searchtextAdds base mods whose shown name or description contains the text. Repeatable.None
--spoiler-freenoneMakes the text search above use the spoiler-free names and descriptions.Off
--receiptnoneAdds a selection receipt that can be compared later. Hashes the mod folder, so it can be slow. Needs --json and --source-dir.Off
--jsonnonePrints JSON instead of text.Off

Example:

modsync selection --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --json

Validate, install and conflicts

validate checks a guide without changing anything. install validates, takes a snapshot of both folders, and then installs in order. conflicts reports game files that more than one component writes. All three accept the same options, so the table below covers them together.

modsync validate  --input <guide> --game-dir <folder> --source-dir <folder> [options]
modsync install   --input <guide> --game-dir <folder> --source-dir <folder> [options]
modsync conflicts --input <guide> --game-dir <folder> --source-dir <folder> [options]

Options marked validate only are refused by install and conflicts. Options marked install only are refused by validate.

OptionValueWhat it doesDefault
-i, --inputfileThe guide. Required, unless you use --profile or --active-profile.None
-g, --game-dirfolderYour game folder. Required, unless you use a profile that already has it.None
-s, --source-dirfolderThe folder that holds the downloaded mod archives.The folder that contains the guide
-d, --downloadnoneDownloads the selected resources before validation and the snapshot. Install only.Off
--concurrentnoneUses four download workers instead of one. Needs --download.One worker
--nexus-mods-api-keykeyNexus Mods API key for downloads. Also accepted as --nexus-api-key.The key in your settings
--download-timeout-hourswhole hoursLongest time the download step may take. Zero uses the 48-hour default.48
--profilenameApplies a saved profile before your explicit options. Cannot be used with --active-profile.None
--active-profilenoneUses the profile that is currently active in the settings. Fails if none is set.Off
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform
--use-file-selectionnoneUses the IsSelected values in the guide.Off. All top-level components are selected.
--selectname, GUID, category:Name or tier:NameSelects components. Repeat the flag, or list several values after one flag. Selections are applied in the order you type them, together with --option.None
--optionGUIDTurns on an option. Existing option selections are kept.None
--deselect, --deselect-option, --select-through-tier, --add-category, --select-visible-search, --spoiler-freeas for selectionSame selection changes as the selection command. They are applied after --select.None
--fomod-choicesfileA saved FOMOD choices file (version 1) for this run. It is not saved back to disk.None
--pause-filefileWhile this file exists, the run holds at the next safe point: between downloads or reads, or between components, never inside one. Delete the file to carry on. Stopping still works while held.None
--fomod-skipnoneSkips the FOMOD setup step. Installers that are still unresolved stop the run.Off
--interactivenoneAsks you to set up FOMOD installers in the terminal.Off
--non-interactivenoneTurns off the terminal FOMOD prompts. Cannot be used with --interactive.Off
--allow-processesnoneAllows external patcher executables and Execute/Run programs, using your user permissions. Linked OdyPatcher runs within ModSync.Off
--patcherfileExplicit external patcher executable, overriding the saved path. Also accepted as --kpatcher-path or --odypatcher-path.Saved executable, otherwise linked OdyPatcher
--patcher-engineody-patcher, k-patcher or holo-patcherWhich patcher backend runs patcher steps. Not case sensitive.Saved backend, otherwise OdyPatcher
--direct-markdownnoneInstalls a Markdown guide in the order it is written. Install only. Cannot be combined with selection, profile or FOMOD options.Off
--phaseall, base or remainingRuns all selected components, only the base build, or the verified remaining part after a checkpoint.all
--managednoneUses managed deployment. Needs --component-checkpoints. Install only.Off
--no-managednoneInstalls without managed deployment. Install only. Cannot be used with --managed.Off
--staging-dir, --manifest-dirfoldersFolders for managed deployment. Use both together, with --managed.None
--component-checkpointsnoneKeeps a verified checkpoint after each top-level component finishes. Install only.Off
--no-checkpointnoneKeeps recovery for the whole run only, with no per-component history. Cannot be used with the two options above. Install only.Off
--scratch-dirfolderA folder for temporary archive files. It must already exist and be outside both the game and mod folders.The system temporary folder
--max-expanded-bytesbytesLargest size one archive may expand to. Extraction also checks free space in the scratch folder.No limit
--jsonnoneinstall prints one JSON event per line. validate prints events per line when both folders are given, or one report when they are not. conflicts always prints JSON.Off
--install-progress-jsonnonePrints typed progress lines on stdout. Install only. Cannot be used with --json.Off
--outputtext or jsonOutput format for the validation report. Use json for a single pretty-printed report. Validate only.text
--validation-reportnonePrints the validation report as JSON. Same as --output json. Validate only.Off
--errors-onlynoneHides successful stages and warnings in text output. Validate only.Off
--fullnoneAdds the environment, conflict and install-order checks. Validate only.Off
--dry-runnoneAdds a dry run that changes nothing, and includes its result in the report. Validate only.Off
--dry-run-onlynoneRuns only the FOMOD setup check and the dry run. Validate only.Off

ModSync always stops at the first failure. --best-effort is refused, and so are several older flags that would skip validation or keep going after an error. Fix the cause, then restore and run again from the start.

Examples:

modsync validate --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --output json
modsync install  --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --select "Another Mod"
modsync conflicts --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods

To pause a long install from another terminal, start it with --pause-file, then create the file to pause and delete it to resume:

modsync install --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --pause-file /tmp/modsync.pause
touch /tmp/modsync.pause   # holds at the next safe point
rm /tmp/modsync.pause      # carries on

restore

Puts both folders back to the snapshot taken before an unfinished install. It checks the snapshot before and after restoring. It only works on an unfinished install.

modsync restore --game-dir <folder> --source-dir <folder>
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None

Example:

modsync restore --game-dir /path/to/game --source-dir /path/to/mods

completion-summary

Shows the saved result of the last completed install, or says that none is saved.

modsync completion-summary --game-dir <folder> --source-dir <folder> [--json]
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None
--jsonnonePrints the summary as JSON. Prints null when there is no saved result.Off

Example:

modsync completion-summary --game-dir /path/to/game --source-dir /path/to/mods --json

fomod-inspect

Reads the FOMOD setup options inside a mod archive and prints them as JSON. Nothing is installed.

modsync fomod-inspect <archive> [options]
ArgumentValueWhat it doesDefault
<archive>fileThe mod archive to read. Required.None
--choicesfileApplies the matching entry from a saved FOMOD choices file (version 1).None
--extracted-directoryrelative pathAdds copy steps for this folder inside the mod.None
--save-choicesfileSaves your current selections to a reusable choices file (version 1).None
--interactivenoneAsks you to pick plugin options in the terminal. Prompts go to stderr.Off
--scratch-dirfolderA folder for temporary files. Must already exist.The system temporary folder
--max-expanded-bytesbytesLargest size the archive may expand to.No limit

Example:

modsync fomod-inspect "Some Mod.7z" --save-choices some-mod-choices.json

Patchers

Guide Patcher steps use the linked OdyPatcher library by default. Selecting an external executable requires --allow-processes on install. The standalone commands below also require explicit trust.

holopatcher

Runs a HoloPatcher backend on its own, outside a guide install. You can use it to test a patcher run. Nothing is checked against a guide.

modsync holopatcher --patcher <program> --allow-processes [options] [-- <backend arguments>]
OptionValueWhat it doesDefault
--patcherfileThe HoloPatcher program to run.None
--allow-processesnoneLets the program run with your user permissions. Required.Off
-a, --argstextArguments as one string. Split without a shell. Cannot be used with the arguments after --.None
--working-directoryfolderThe folder the program starts in.None
--timeout-seconds1 to 86400Stops the program after this many seconds.3600
-- ...argumentsPasses everything after -- to the program unchanged.None

Example:

modsync holopatcher --patcher /path/to/holopatcher --allow-processes --timeout-seconds 600 -- --help

install-python-deps

Always fails with an explanation. It does not install anything. Use a HoloPatcher package you have checked, or a Python environment you manage yourself.

modsync install-python-deps [--force]
OptionValueWhat it doesDefault
--forcenoneAccepted, but makes no difference.Off

Example:

modsync install-python-deps

Guides: convert, merge and drafting

These commands read, change, compare and save guide files. They never install anything. Guides can be TOML, JSON, YAML, XML or Markdown.

convert

Converts a guide to another format. It can also draft instructions from a Markdown guide, or generate instructions from archives you already have.

modsync convert <input> <output> [options]
modsync convert --stdin --format yaml < guide.json
OptionValueWhat it doesDefault
<input>, -i, --inputfileThe guide to convert. Give it as a position or with the flag.None
<output>, -o, --outputfileWhere to save the result. If left out, the result is printed to the terminal.Terminal
--stdinnoneReads the guide from standard input (up to 8 MiB). Cannot be used with an input file.Off
-f, --formattoml, json, yaml or xmlThe format to write.toml
--parse-directionsnoneDrafts instructions from the written directions. Generated steps must be reviewed before you install.Off
--review-draftcomponent GUIDMarks a component's drafts as reviewed. Repeat for more components.None
--review-verified-draftsnoneMarks drafts as reviewed only when a fresh check of the matching local archive gives the same result. Needs --source-path. Prints a JSON summary on stderr.Off
--ignore-errorsnoneSorts components even when an install-before or install-after reference is missing, instead of stopping.Off

Also accepts the options in Shared processing options.

Example:

modsync convert instructions.toml instructions.json
modsync convert guide.md draft.json --parse-directions

Shared processing options

These options are used by convert and merge. They can download resources, generate instructions from local archives, and add spoiler-free text.

OptionValueWhat it doesDefault
--fomod-choicesfileFOMOD choices (version 1) used during the download step.None
--fomod-skipnoneSkips FOMOD setup after downloads. Installers that are still unresolved block processing.Off
--interactive, --non-interactivenoneTurns FOMOD terminal prompts on or off. Cannot be used together.Off
-s, --selectname, GUID, category:Name or tier:NameChooses which components are kept in the output. Repeatable.None
-d, --downloadnoneDownloads every resource in the guide before writing output. Needs --source-path.Off
--concurrentnoneUses four download workers. Needs --download.One worker
--source-pathfolderThe folder with your downloaded archives.None
--auto-generate-localnoneCreates missing instructions from the archives in --source-path. Input archives are never deleted. Needs --source-path.Off
-a, --autononeCreates instructions from file names of resources the guide already resolved, marked for review. Cannot be used with --resolved-archives.Off
--resolved-archivesfile (JSON array)Links named archives in --source-path to component GUIDs. Needs --source-path.None
--archive-mapfile (JSON object)Maps guide link URLs to archive file names in --source-path. Those links skip file name matching in --auto-generate-local. Needs --source-path.None
--nexus-mods-api-keykeyNexus Mods API key for downloads.The key in your settings
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform
--spoiler-freeMarkdown fileAdds the five spoiler-free text fields from a separate Markdown guide.None

merge

Merges two guides into one. Components are matched by GUID first, then by normalized name and author.

modsync merge <existing> <incoming> [output] [options]
OptionValueWhat it doesDefault
<existing>, -e, --existingfileThe guide you already have. Give it as a position or with the flag.None
<incoming>, -n, --incomingfileThe guide with new or changed content.None
[output], -o, --outputfileWhere to save the merged guide.Terminal
-f, --formatformatFormat of the merged guide.TOML
--use-existing-ordernoneKeeps the order of components in the existing guide.Off
--prefer-existing-fieldsnoneKeeps values from the existing guide for every field.Off
--prefer-existing-name, --prefer-existing-author, --prefer-existing-description, --prefer-existing-directions, --prefer-existing-category, --prefer-existing-tier, --prefer-existing-installation-method, --prefer-existing-instructions, --prefer-existing-optionsnoneKeeps the existing guide's value for that one field.Off
--prefer-existing-resource-registrynoneKeeps the existing guide's resource links. Also accepted as --prefer-existing-modlinks.Off
--prefer-incoming-fieldsnoneAccepted for older scripts. Incoming values already win by default.Incoming wins
--ignore-errorsnoneAccepted for older scripts. Merging does not sort dependencies.Off
--exclude-existing-onlynoneLeaves out components that appear only in the existing guide.Off
--exclude-incoming-onlynoneLeaves out components that appear only in the incoming guide.Off

Also accepts the options in Shared processing options.

Example:

modsync merge old-guide.toml new-guide.toml merged.toml --prefer-existing-resource-registry

merge-preview

Shows what a merge would change, field by field, without saving anything. Use this before merge-apply.

modsync merge-preview <existing> <incoming> [--options <file>]
ArgumentValueWhat it doesDefault
<existing>fileThe guide you already have. Required.None
<incoming>fileThe guide with new content. Required.None
--optionsfile (JSON)Merge settings as a JSON object. Fields you leave out use the usual defaults.Built-in defaults

Example:

modsync merge-preview old-guide.toml new-guide.toml --options merge-options.json > preview.json

merge-apply

Saves a merge that you reviewed with merge-preview. It first checks that both guides are still the same ones.

modsync merge-apply <existing> <incoming> <preview> <output>
ArgumentValueWhat it doesDefault
<existing>fileThe same existing guide you previewed. Required.None
<incoming>fileThe same incoming guide you previewed. Required.None
<preview>fileThe preview file saved from merge-preview. Required.None
<output>fileWhere to save the merged guide. Required.None

Example:

modsync merge-apply old-guide.toml new-guide.toml preview.json merged.toml

guide-draft-review

Creates a review template for one generated component or option. The template is not approved. You still have to review it yourself.

modsync guide-draft-review <input> <component>
ArgumentValueWhat it doesDefault
<input>fileThe guide with generated drafts. Required.None
<component>component name or GUIDThe component to prepare. Required.None

Example:

modsync guide-draft-review drafted.json "Some Mod"

guide-edit

Applies a list of edits, in order, to a guide. The result is saved to a new file. The original is never changed.

modsync guide-edit <input> <operations> <output>
ArgumentValueWhat it doesDefault
<input>fileThe guide to edit. Required.None
<operations>file (JSON)The list of edits to apply, in order. Required.None
<output>fileThe new file to save. Must be a different file from the input. Required.None

Example:

modsync guide-edit guide.toml edits.json guide-edited.toml

guide-import-preview

Previews adding a component document to a guide, from a local file or one you fetched earlier. Nothing is changed.

modsync guide-import-preview <input> <document> [options]
ArgumentValueWhat it doesDefault
<input>fileThe guide to add to. Required.None
<document>fileThe component document to preview. Required.None
--formatauto or a format nameFormat of the document. auto detects it.auto
--regex-profilefileA limited custom regex profile. The output shows the matches. Cannot be used with --format.None
--replacecomponent name or GUIDReplaces this component. Cannot be used with --parent or --index.None
--parentcomponent name or GUIDAdds the new component under this parent.None
--indexnumberPosition to insert the component at.Not set

Example:

modsync guide-import-preview guide.toml new-mod.json > import-preview.json

guide-import-apply

Saves an import you previewed. It only works if the original guide has not changed since the preview.

modsync guide-import-apply <input> <preview> <output>
ArgumentValueWhat it doesDefault
<input>fileThe guide you previewed. Required.None
<preview>fileThe preview saved from guide-import-preview. Required.None
<output>fileWhere to save the updated guide. Required.None

Example:

modsync guide-import-apply guide.toml import-preview.json guide-with-mod.toml

guide-resources

Lists the download resources a component has, and what is inside each archive you already have. It does not extract anything.

modsync guide-resources <input> <component> --source-dir <folder> --game-dir <folder> [--max-expanded-bytes <bytes>]
ArgumentValueWhat it doesDefault
<input>fileThe guide. Required.None
<component>component name or GUIDThe component to look at. Required.None
--source-dirfolderYour mod folder. Required.None
--game-dirfolderYour game folder. Required.None
--max-expanded-bytesbytesLargest size an archive may expand to when it is read.268435456 (256 MiB)

Example:

modsync guide-resources guide.toml "Some Mod" --source-dir /path/to/mods --game-dir /path/to/game

update-summary

Shows the saved update check from a guide, with its timestamp. Guide metadata is not changed.

modsync update-summary <input> [--settings-dir <folder>]
ArgumentValueWhat it doesDefault
<input>fileThe guide. Required.None
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform

Example:

modsync update-summary guide.toml

update-apply

Applies version information you already have to a guide. The version information is a JSON object keyed by game and mod ID.

modsync update-apply <input> <versions> <output> [--summary <file>]
ArgumentValueWhat it doesDefault
<input>fileThe guide to update. Required.None
<versions>file (JSON)Version data keyed as game/modId. Required.None
<output>fileWhere to save the updated guide. Required.None
--summaryfileAlso saves a JSON summary of the update to this file. The result is printed as JSON as well.None

Example:

modsync update-apply guide.toml versions.json guide-updated.toml --summary update-summary.json

update-check

Asks Nexus Mods for the latest versions of the mods a guide tracks, then saves the updated guide. This needs an internet connection and a Nexus Mods API key.

modsync update-check <input> <output> [--nexus-mods-api-key <key>] [--settings-dir <folder>]
ArgumentValueWhat it doesDefault
<input>fileThe guide to check. Required.None
<output>fileWhere to save the updated guide. Required.None
--nexus-mods-api-keykeyUses this key instead of the one in your settings.The key in your settings
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform

Example:

modsync update-check guide.toml guide-checked.toml

Downloads and sharing

These commands download archives, check them, and share them through BitTorrent. Downloaded archives are checked before they are saved. An existing file is never overwritten.

Privacy options for BitTorrent commands

These options apply to torrent-seed, torrent-download and torrent-inspect. Peer traffic goes through a SOCKS5 proxy by default, so peers see the proxy's address instead of yours. The proxy operator can still see your traffic.

OptionValueWhat it doesDefault
--peer-proxysocks5://IP:PORTA SOCKS5 proxy for every peer and tracker connection. Repeat to add fallbacks.None
--peer-proxy-list-urlURL, or ""A public proxy list to try when none of your proxies work. Pass "" to turn this off.The monosans proxy list
--tracker-list-urlHTTP or HTTPS URLA tracker list to use. Repeat for more lists.The ngosang HTTP and HTTPS lists
--no-proxynoneConnects to peers directly. Peers can see your IP address. Opens a listening port, and uses DHT and UPnP.Off
--upload-kibpsKiB per second (16 or more)Caps how fast you upload while sharing.100
--no-upload-while-downloadingnoneDownloads from peers without uploading to them.Off
--share-hourshours (0 for no limit)Stops sharing after this many hours. Used with --authored-magnet.24
--share-ratioratio (0 for no limit)Stops sharing once you have uploaded this much compared with what you downloaded. Used with --authored-magnet.1.0

With no working proxy, the command stops. It does not connect to peers directly. Use --no-proxy only if you accept that peers will see your IP address.

download

Downloads one archive over HTTPS and checks it before saving. A web page, a damaged archive, an unsafe file name or a checksum mismatch makes the download fail.

modsync download <url> <output> [options]
ArgumentValueWhat it doesDefault
<url>HTTPS linkThe archive's address. Required.None
<output>fileWhere to save the archive. Required. Existing files are not overwritten.None
--source-dirfolderYour mod folder. Coordinates nested outputs with installs and maintenance on this folder.None
--sha256hashThe expected SHA-256 hash. The download fails if it does not match.No check
--max-expanded-bytesbytesLargest size the archive may expand to during the check.No limit

Example:

modsync download https://example.org/mod.zip /path/to/mods/mod.zip --sha256 EXPECTED_HASH

This command works with direct HTTPS links to ZIP, 7z, RAR, TAR and GZip files. Nexus Mods and DeadlyStream pages, and MEGA links, are downloaded in your browser instead.

download-plan

Shows which of the file names a download page offers would be used for a component. It downloads nothing. It is a file name plan, not a check that the install is ready.

modsync download-plan <input> --component <component> --url <url> [--filename <name>]... [--source-dir <folder>]
ArgumentValueWhat it doesDefault
<input>fileThe guide. Required.None
--componentcomponent name or GUIDThe component. Required.None
--urlURLThe download page the file names came from. Required.None
--filenamefile nameA file name the page offers. Repeat for each one, in order.None
--source-dirfolderYour mod folder.None

Example:

modsync download-plan guide.toml --component "Some Mod" --url https://example.com/mod --source-dir /path/to/mods --filename first.zip --filename alternative.zip

download-provider

Reports which download provider handles a web address. Nothing is downloaded.

modsync download-provider <url>
ArgumentValueWhat it doesDefault
<url>HTTP or HTTPS linkThe address to check. Required.None

Example:

modsync download-provider https://example.org/mod.zip

download-batch

Downloads a list of archives at the same time, with a limit on how many run together and a number of retries.

modsync download-batch <input> [options]
ArgumentValueWhat it doesDefault
<input>file (JSON array)The download jobs, as a JSON array. Required.None
--source-dirfolderEvery output must be inside this mod folder. It must already exist.None
--workersnumberHow many downloads run at once.4
--retriesnumberHow many times to retry a failed download.1
--scratch-dirfolderA folder for temporary files. Must already exist.Not set
--max-expanded-bytesbytesLargest size each archive may expand to.No limit

Example:

modsync download-batch jobs.json --source-dir /path/to/mods --workers 2

fetch-downloads

Downloads the archives for every selected component in a guide. It uses the existing archives, the Origin links and peer sources where it can. It can also save what it learned to the guide.

modsync fetch-downloads --input <guide> --source-dir <folder> [options]
OptionValueWhat it doesDefault
--inputfileThe guide. Required.None
--source-dirfolderYour mod folder. Required.None
--game-dirfolderYour game folder. Lets ModSync apply the Aspyr-only rules.None
--use-file-selectionnoneUses the IsSelected values in the guide.Off. All top-level components are selected.
--selectname, GUID, category:Name or tier:NameSelects components. Repeat the flag, or list several values after one flag.None
--optionGUIDTurns on an option and its parent mod. Repeatable.None
--deselect, --deselect-option, --select-through-tier, --add-category, --select-visible-search, --spoiler-freeas for selectionSame selection changes as the selection command.None
--workersnumberHow many downloads run at once.4
--retriesnumberHow many times to retry a failed download.1
--nexus-mods-api-keykeyNexus Mods API key for downloads.The key in your settings
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform
--peer-modeoff, race or fallbackChooses how peer sources are used. Overrides the peer mode saved in settings. A peer sharing setting that is turned off still wins.The saved peer mode
--scratch-dirfolderA folder for temporary files outside the game and mod folders. Must already exist.The system temporary folder
--max-expanded-bytesbytesLargest size each archive may expand to.No limit
--dry-runnonePrints the plan and stops. Downloads, records and saves nothing.Off
--progress-jsonnonePrints one JSON event per line as it works, then one summary line.Off
--recordnoneSaves the acquisition details, and any FOMOD choices and status changes you accept, back into the guide.Off
--fomod-skipnoneLeaves FOMOD installers unconfigured and marks them as dismissed.Off
--fomod-choicesfileFOMOD choices (version 1). Overrides the MODSYNC_FOMOD_CHOICES environment variable.None
--interactive, --non-interactivenoneAsks you to configure downloaded FOMOD installers in the terminal, or turns the prompts off. Cannot be used together.See description

Example:

If you saved a DeadlyStream sign-in with deadlystream-sign-in --save, DeadlyStream downloads are made signed in.

modsync fetch-downloads --input guide.toml --source-dir /path/to/mods --game-dir /path/to/game --select "Some Mod" --dry-run

nxm-download

Turns a Nexus Mods download link (nxm://) into an archive. It uses your Nexus Mods API key. Optionally, it matches the link to a component in a guide.

modsync nxm-download <url> <output> [options]
ArgumentValueWhat it doesDefault
<url>nxm:// linkThe link to resolve. Required.None
<output>file, or folder with --inputWhere to save the archive. With --input, this is the mod folder instead.None
--source-dirfolderThe mod folder for a nested archive. Cannot be used with --input.None
--inputfileThe guide to match the link against. Prints the run report.None
--recordnoneWrites the matched file back into the guide. Needs --input.Off
--nexus-mods-api-keykeyNexus Mods API key to use.The key in your settings
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform

Example:

modsync nxm-download "nxm://kotor/mods/123/files/456" /path/to/mods/mod.7z

torrent-seed

Shares one exact archive through BitTorrent, so others can download it. It prints the magnet link, the SHA-256 hash and the torrent info as JSON, then keeps sharing until you press Ctrl+C. A guide maintainer uses this, and then records the three values in the guide.

modsync torrent-seed <archive> [options]
ArgumentValueWhat it doesDefault
<archive>fileThe archive to share. Required.None
--trackerHTTP or HTTPS announce URLA tracker to announce to. Repeat to add fallbacks.Built-in tracker lists
--authored-magnetmagnet linkShares under this magnet link, instead of creating a new torrent. Use it with --torrent-info.None
--torrent-infobase64 textThe saved torrent info from your guide. Shared as it is. Needs --authored-magnet.None
Privacy optionssee aboveThe options in Privacy options for BitTorrent commands.See above

Example:

modsync torrent-seed /path/to/archives/mod.7z --tracker https://tracker.example.org/announce

When sharing stops, the command prints a second JSON line with the outcome, the reason and how much was uploaded. With --authored-magnet, ModSync shares a private copy of the archive, not the file itself, and deletes the copy when sharing stops.

torrent-download

Downloads one archive from a BitTorrent link, checks it against the SHA-256 hash in the guide, and saves it. It never overwrites an existing file.

modsync torrent-download <magnet> <output> --sha256 <digest> [options]
ArgumentValueWhat it doesDefault
<magnet>magnet linkThe link from the guide. Required. Quote it in your shell.None
<output>fileWhere to save the archive. Required.None
--sha256hashThe expected SHA-256 hash. The torrent is thrown away if it does not match. Required.None
--torrent-infobase64 textThe torrent info saved in the guide.None
--peeraddress and portA known seeder, from torrent-seed output. Repeat for fallbacks.None
--source-dirfolderYour mod folder. Coordinates nested outputs with installs and maintenance on this folder.None
--max-expanded-bytesbytesLargest size the archive may expand to during the check.No limit
Privacy optionssee aboveThe options in Privacy options for BitTorrent commands.See above

Example:

modsync torrent-download 'magnet:?xt=urn:btih:EXAMPLE' /path/to/mods/mod.7z --sha256 EXPECTED_HASH --torrent-info BASE64_TEXT

The torrent must hold exactly one archive.

torrent-inspect

Checks a local archive against a magnet link and the torrent info, without using the network.

modsync torrent-inspect <archive> <magnet> [options]
ArgumentValueWhat it doesDefault
<archive>fileThe local archive to check. Required.None
<magnet>magnet linkThe magnet link from the guide. Required.None
--sha256hashThe expected SHA-256 hash.No check
--torrent-infobase64 textThe torrent info saved in the guide.None
--max-expanded-bytesbytesLargest size the archive may expand to.No limit

Example:

modsync torrent-inspect /path/to/mods/mod.7z 'magnet:?xt=urn:btih:EXAMPLE' --sha256 EXPECTED_HASH

Profiles and settings

A profile saves your guide path, folders and selections under one name. Profiles and settings live in a ModSync folder in your settings location, unless you choose another folder with --settings-dir.

profile

Creates, lists, shows, copies, renames, deletes, activates, captures and applies profiles. Add --json to get JSON output.

modsync profile --action <action> [options]
OptionValueWhat it doesDefault
-a, --actionlist, show, create, clone, rename, delete, activate, capture or applyWhat to do. Not case sensitive.list
-n, --nametextProfile name. Used by most actions. For clone and rename, it can stand in for --from.None
--fromtextThe profile to copy or rename from.None
--totextThe new profile name, for clone and rename.None
--inputfileThe guide. Required for capture. Used by apply.None
--outputfileWhere apply saves the guide with the profile's selections.None
--game-dirfolderYour game folder, saved with the profile by capture.None
--source-dirfolderYour mod folder, saved with the profile by capture.None
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform
--jsonnonePrints the result as JSON. Without it, the result is a short text summary.Off

Notes:

  • show, create, delete, activate and capture take --name.
  • clone and rename take --from and --to.
  • capture updates an existing profile and keeps its creation time.
  • activate saves the profile as active. It leaves other settings alone.

Example:

modsync profile --action capture --name "Full Build" --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods

settings

Reads and changes single keys in settings.json. Passwords and keys are hidden unless you ask for them.

modsync settings --action <inspect|list|get|set> [options]
OptionValueWhat it doesDefault
-a, --actioninspect, list, get or setinspect shows the main settings. list shows every key. get reads one key. set writes one key. Required.None
-k, --keytextThe key to read or write. Needed for get and set.None
--valuetextThe new value for set. true, false, null, numbers, and JSON objects or arrays are stored as JSON. Anything else is stored as text. Leave it empty to remove the key.None
--settings-dirfolderThe folder that holds settings.json.The ModSync settings folder for your platform
--jsonnonePrints JSON instead of text.Off
--reveal-secretsnoneShows secret values, such as your Nexus Mods API key, instead of ***.Off

Example:

modsync settings --action list
modsync settings --action get --key nexusModsApiKey

set-nexus-api-key

Saves your Nexus Mods API key in your settings. It checks the key first, unless you skip the check. The key is never printed.

modsync set-nexus-api-key <api-key> [options]
Argument or optionValueWhat it doesDefault
<api-key>textYour personal Nexus Mods API key. Required.None
--skip-validationnoneSaves the key without checking it first.Off
--settings-dirfolderThe folder that holds settings.json.The ModSync settings folder for your platform
--jsonnonePrints whether the key was saved and whether it was checked. The key itself is not included.Off

Example:

modsync set-nexus-api-key YOUR_API_KEY

Builds and accounts

These commands keep a list of mod builds, look up mod pages, find game installs, import loose archives and manage a DeadlyStream sign-in. The desktop app uses the same features. Commands that print JSON are meant for scripts as well as people.

builds

Lists, adds, removes and fetches mod builds: the KOTOR Community builds plus build links you add. Each build is an instruction file fetched over HTTPS and kept in builds/ inside the settings folder, so it opens again without a connection. Run as modsync builds <action>.

modsync builds list
modsync builds add --label <name> --game <KOTOR1|KOTOR2> --url <link>
modsync builds remove --key <key>
modsync builds fetch --key <key> [--refresh]
Action or optionValueWhat it doesDefault
listnonePrints every build as JSON, with its key, name, game and link.None
add--label, --game, --urlAdds a build link: an instruction file, or a community portal build page. --game is KOTOR1 or KOTOR2. Prints the new build as JSON.None
remove--keyRemoves a build you added and its saved copy. The community builds cannot be removed.None
fetch--key, --refreshPrints the path of the build's instruction file, downloading it if there is no saved copy. --refresh downloads the latest version even when a saved copy exists. If the download fails, the saved copy is used and a warning is printed.None
--settings-dirfolderThe folder that holds settings.The ModSync settings folder for your platform

--settings-dir can go before or after the action. Example:

guide=$(modsync builds fetch --key KEY_FROM_LIST)
modsync validate --input "$guide" --game-dir /path/to/game --source-dir /path/to/mods

import-archive

Imports a mod archive that is not part of a build. The archive is copied into the mod folder (an existing different file with the same name is never replaced), its contents are inspected without changing anything, and a one-mod guide that installs it is written. Install that guide with install. Archives with no game files or TSLPatcher data are refused, because they need installing by hand.

modsync import-archive <archive> --source-dir <folder> --output <guide> [--name <name>]
Argument or optionValueWhat it doesDefault
<archive>fileA ZIP, 7z or RAR mod archive. Required.None
--source-dirfolderThe mod folder the archive is placed in. Required.None
--outputfileWhere to write the guide. Required.None
--nametextThe mod's name.The archive name

It prints JSON with the archive path, whether it was copied, its SHA-256, the install method it found, and the new guide's component name and GUID.

Example:

modsync import-archive ~/Downloads/SomeMod.7z --source-dir /path/to/mods --output somemod.toml
modsync install --input somemod.toml --game-dir /path/to/game --source-dir /path/to/mods

mod-info

Shows the title, description, author and screenshots of a DeadlyStream or Nexus Mods page as JSON. Nexus pages need a saved Nexus API key. Nothing is written to disk.

modsync mod-info <url> [--settings-dir <folder>]
Argument or optionValueWhat it doesDefault
<url>linkA DeadlyStream or Nexus Mods mod page. Required.None
--settings-dirfolderThe folder that holds the Nexus API key.The ModSync settings folder for your platform

Example:

modsync mod-info https://deadlystream.com/files/file/EXAMPLE-mod/

detect-games

Lists the KOTOR installs found on this computer: Steam (every library), and on Windows the GOG and Origin/EA folders. It only reads; nothing is created or changed.

modsync detect-games [--json]
OptionValueWhat it doesDefault
--jsonnonePrints the installs as JSON, including whether a KOTOR 2 install has the Aspyr update.Off. One line per install.

Example:

modsync detect-games

deadlystream-sign-in

Checks a DeadlyStream account by signing in the way a browser does. The password is read from the MODSYNC_DEADLYSTREAM_PASSWORD environment variable, sent once over HTTPS to deadlystream.com only, and never stored. With --save, the signed-in session (not the password) is kept in settings so DeadlyStream downloads are made signed in.

MODSYNC_DEADLYSTREAM_PASSWORD=<password> modsync deadlystream-sign-in --username <name> [--save] [--settings-dir <folder>]
OptionValueWhat it doesDefault
--usernametextYour DeadlyStream user name. Required.None
--savenoneKeeps the signed-in session for later downloads.Off
--settings-dirfolderThe folder that holds settings.The ModSync settings folder for your platform

Example:

read -rs MODSYNC_DEADLYSTREAM_PASSWORD && export MODSYNC_DEADLYSTREAM_PASSWORD
modsync deadlystream-sign-in --username YOUR_NAME --save

deadlystream-status

Checks whether the session saved by deadlystream-sign-in --save is still signed in, and prints the user name and signedIn as JSON. An expired session is forgotten; a renewed one is saved.

modsync deadlystream-status [--settings-dir <folder>]
OptionValueWhat it doesDefault
--settings-dirfolderThe folder that holds settings.The ModSync settings folder for your platform

Example:

modsync deadlystream-status

deadlystream-sign-out

Forgets the DeadlyStream session saved by deadlystream-sign-in --save.

modsync deadlystream-sign-out [--settings-dir <folder>]
OptionValueWhat it doesDefault
--settings-dirfolderThe folder that holds settings.The ModSync settings folder for your platform

Example:

modsync deadlystream-sign-out

app-update

Checks a GitHub repository's latest release against the version you have, and can download the build for this system. Prints the check, and the downloaded file if any, as JSON. Replacing the running program is left to you.

modsync app-update --repo <owner/name> --current <version> [--download <folder>]
OptionValueWhat it doesDefault
--repoowner/nameThe repository to check. Required.None
--currentversionThe version installed now. Required.None
--downloadfolderDownloads the new build into this folder when one is available.None

Example:

modsync app-update --repo kolto-labs/ModSync.rs --current 0.1.0

changelog-section

Prints the notes for one version from a changelog file. Fails if the changelog has no section for that version.

modsync changelog-section --changelog <file> --version <version>
OptionValueWhat it doesDefault
--changelogfileThe changelog to read. Required.None
--versionversionThe version whose notes to print. Required.None

Example:

modsync changelog-section --changelog CHANGELOG.md --version 0.1.0

Checkpoints

A checkpoint is a saved copy of both folders at a known point, so you can go back to it. These commands create, check, compare and restore checkpoints. Each one is run as modsync checkpoint <action>.

Folder options for checkpoint commands

Every checkpoint action except resume takes these two folders. resume accepts the install options instead.

OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None

checkpoint capture

Saves a new baseline of both folders as a new session. It does not install, restore, or mark any component as done.

modsync checkpoint capture --game-dir <folder> --source-dir <folder>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None

Example:

modsync checkpoint capture --game-dir /path/to/game --source-dir /path/to/mods

checkpoint list

Lists saved checkpoint sessions. It does not create or repair anything.

modsync checkpoint list --game-dir <folder> --source-dir <folder>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None

Example:

modsync checkpoint list --game-dir /path/to/game --source-dir /path/to/mods

checkpoint history

Lists every saved checkpoint in one session, with short details.

modsync checkpoint history --game-dir <folder> --source-dir <folder> --session <session>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session to list. Required.None

Example:

modsync checkpoint history --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID

checkpoint verify

Checks a checkpoint's records and every stored file it refers to.

modsync checkpoint verify --game-dir <folder> --source-dir <folder> --session <session> [--checkpoint <id>]
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session to check. Required.None
--checkpointcheckpoint IDThe checkpoint to check.The session's current (HEAD) checkpoint

Example:

modsync checkpoint verify --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID

checkpoint inspect

Shows one checkpoint and where its session came from.

modsync checkpoint inspect --game-dir <folder> --source-dir <folder> --session <session> [--checkpoint <id>]
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session. Required.None
--checkpointcheckpoint IDThe checkpoint to show.The session's current (HEAD) checkpoint

Example:

modsync checkpoint inspect --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID

checkpoint diff

Compares the files and folders in two checkpoints.

modsync checkpoint diff --game-dir <folder> --source-dir <folder> --session <session> --from <id> --to <id>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session both checkpoints belong to. Required.None
--fromcheckpoint IDThe older checkpoint. Required.None
--tocheckpoint IDThe newer checkpoint. Required.None

Example:

modsync checkpoint diff --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID --from CHECKPOINT_A --to CHECKPOINT_B

checkpoint provenance

Shows every saved change to one file or folder path, across the checkpoints in a session.

modsync checkpoint provenance --game-dir <folder> --source-dir <folder> --session <session> --tree <mods|game> --path <path> [--checkpoint <id>]
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session. Required.None
--treemods or gameWhich folder the path is in. Required.None
--pathrelative pathThe file or folder path to look up. Required.None
--checkpointcheckpoint IDThe checkpoint to look at.Not set

Example:

modsync checkpoint provenance --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID --tree game --path Override/sample.tga

checkpoint restore

Restores a saved checkpoint. The restore starts a new linked branch of history, so the older checkpoints are kept.

modsync checkpoint restore --game-dir <folder> --source-dir <folder> --session <session> --checkpoint <id>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session. Required.None
--checkpointcheckpoint IDThe checkpoint to restore. Required.None

Example:

modsync checkpoint restore --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID --checkpoint CHECKPOINT_ID

checkpoint recover

Finishes a checkpoint operation that was interrupted. Run it before you install anything else.

modsync checkpoint recover --game-dir <folder> --source-dir <folder> [--session <session>]
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDWhich session to recover, if more than one needs it.None

Example:

modsync checkpoint recover --game-dir /path/to/game --source-dir /path/to/mods

checkpoint resume

Continues an install from the last verified checkpoint. It runs the components that come after it, in guide order.

modsync checkpoint resume --input <guide> --game-dir <folder> --source-dir <folder> --session <session> [options]
OptionValueWhat it doesDefault
All install optionssee validate, install and conflictsAccepts every option that install accepts.See that table
--sessionsession IDThe session whose checkpoint is the starting point. Required.None
--accept-source-changesnoneAccepts that archives in your mod folder have changed since the checkpoint. The game and managed state must still match.Off

Example:

modsync checkpoint resume --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID

checkpoint repair

Fixes stored files that are damaged. A file is only repaired from a copy whose bytes match the hash and size saved with it.

modsync checkpoint repair --game-dir <folder> --source-dir <folder> --session <session> [--checkpoint <id>]
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session to repair. Required.None
--checkpointcheckpoint IDThe checkpoint to repair from.Not set

Example:

modsync checkpoint repair --game-dir /path/to/game --source-dir /path/to/mods --session SESSION_ID

checkpoint delete-session

Moves a session into the checkpoint trash. It only works on a session that is not in use and that no checkpoint or receipt still needs.

modsync checkpoint delete-session --game-dir <folder> --source-dir <folder> --session <session>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None
--sessionsession IDThe session to move to the trash. Required.None

Example:

modsync checkpoint delete-session --game-dir /path/to/game --source-dir /path/to/mods --session OLD_SESSION_ID

checkpoint gc

Frees disk space by removing stored content that no kept checkpoint or receipt still refers to.

modsync checkpoint gc --game-dir <folder> --source-dir <folder>
OptionValueWhat it doesDefault
Folder optionssee aboveBoth folders are required.None

Example:

modsync checkpoint gc --game-dir /path/to/game --source-dir /path/to/mods

Deployments

Deployments copy mod files from a staging folder into your game folder, and keep a record (a manifest) of each one. You can remove a single deployment later and put back the files it replaced. Run as modsync deployment <action>.

Folder options for deployment commands

Most deployment actions use these options to find the staging and manifest folders. You can give the folders directly, or name a profile and let ModSync use the folders inside it.

OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--staging-dirfolderThe folder that holds the mod files to deploy.The profile's staging folder
--manifest-dirfolderThe folder that holds the deployment records.The profile's deployment folder
--profilenameThe profile whose folders to use.The active profile
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform

deployment status

Lists the deployed component records, oldest first.

modsync deployment status --game-dir <folder> [folder options]
OptionValueWhat it doesDefault
Folder optionssee aboveWhich folders to read.See above

Example:

modsync deployment status --game-dir /path/to/game --profile "Full Build"

deployment deploy

Copies one component from the staging folder into your game folder, and records what it did.

modsync deployment deploy --game-dir <folder> --component <name> [--name <label>] [folder options]
OptionValueWhat it doesDefault
--componentcomponent folder nameThe component folder inside the staging folder. Required.None
--nametextAn optional name for this deployment.None
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment deploy --game-dir /path/to/game --staging-dir /path/to/staging --manifest-dir /path/to/manifests --component "Some Mod"

deployment uninstall

Removes the files one deployment owns, and puts back the files it had replaced.

modsync deployment uninstall --game-dir <folder> --component <name> [folder options]
OptionValueWhat it doesDefault
--componentcomponent nameThe deployment to remove. Required.None
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment uninstall --game-dir /path/to/game --profile "Full Build" --component "Some Mod"

deployment purge

Removes every deployment, newest first.

modsync deployment purge --game-dir <folder> [folder options]
OptionValueWhat it doesDefault
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment purge --game-dir /path/to/game --profile "Full Build"

deployment remove

Deletes the staged copy of a component that is not deployed, so it leaves the library. A deployed component must be uninstalled first. The game folder is never touched. Prints whether anything was removed.

modsync deployment remove --game-dir <folder> --component <name> [folder options]
OptionValueWhat it doesDefault
--componentcomponent nameThe staged component to delete. Required.None
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment remove --game-dir /path/to/game --profile "Full Build" --component "Some Mod"

deployment duplicates

Lists deployed components that share a name, such as older copies of the same mod, as JSON. For each name it shows the newest copy, which is kept, and the older ones. It only reads.

modsync deployment duplicates --game-dir <folder> [folder options]
OptionValueWhat it doesDefault
Folder optionssee aboveWhich folders to read.See above

Example:

modsync deployment duplicates --game-dir /path/to/game --profile "Full Build"

deployment snapshot

Saves a list of hashes for every file in the game folder. Run it before you run a patcher, so you can later see what the patcher changed.

modsync deployment snapshot --game-dir <folder> --out <file> [folder options]
OptionValueWhat it doesDefault
--outfileWhere to save the hash list. Required.None
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment snapshot --game-dir /path/to/game --profile "Full Build" --out before-patch.json

deployment record

Records the game files that changed since a snapshot, as one component's deployment. Use it after a patcher has run.

modsync deployment record --game-dir <folder> --component <name> --before <snapshot> [--name <label>] [--backup-source <folder>] [folder options]
OptionValueWhat it doesDefault
--componentcomponent nameThe component the changes belong to. Required.None
--beforefileThe snapshot saved by deployment snapshot. Required.None
--nametextA label for this deployment.None
--backup-sourcefolderA copy of the game folder from before the patcher ran. Supplies the originals of changed files.None
Folder optionssee aboveWhich folders to use.See above

Example:

modsync deployment record --game-dir /path/to/game --profile "Full Build" --component "Some Mod" --before before-patch.json

deployment switch

Makes another profile the active one. It is refused while the current profile still has deployments, unless you add --purge-current.

modsync deployment switch --game-dir <folder> --to <profile> [--settings-dir <folder>] [--purge-current]
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--toprofile nameThe profile to activate. Required.None
--settings-dirfolderThe folder that holds settings and profiles.The ModSync settings folder for your platform
--purge-currentnoneRemoves the current profile's deployments first, then switches.Off

Example:

modsync deployment switch --game-dir /path/to/game --to "Light Build" --purge-current

Maintenance

Maintenance changes the names or access rights of files in your game or mod folder. It always previews first. Apply only runs the exact plan you reviewed. Run as modsync maintenance <action>.

maintenance preview

Shows what a change would do, without changing anything. It prints a digest. Give that digest to maintenance apply.

modsync maintenance preview --game-dir <folder> --source-dir <folder> --target <game|mods> --subtree <path> --action <action> [--json]
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None
--targetgame or modsWhich folder to change. Required.None
--subtreerelative pathA folder inside the target. Use an empty string to pick the whole target folder. Required.None
--actionlowercase-names or owner-writablelowercase-names changes the names of the files and folders inside the subtree to lower case. owner-writable makes them writable by their owner and keeps their ownership as it is. Taking over access lists is not supported. Required.None
--jsonnonePrints one structured result, including failures.Off

Example:

modsync maintenance preview --game-dir /path/to/game --source-dir /path/to/mods --target game --subtree "Override" --action lowercase-names --json

maintenance apply

Makes the change from a preview, but only if the digest matches the plan you reviewed.

modsync maintenance apply --game-dir <folder> --source-dir <folder> --target <game|mods> --subtree <path> --action <action> --expect <digest> [--json]
OptionValueWhat it doesDefault
Preview optionssee maintenance previewThe same target, subtree and action you previewed.None
--expectdigestThe digest that preview printed. Required.None

Example:

modsync maintenance apply --game-dir /path/to/game --source-dir /path/to/mods --target game --subtree "Override" --action lowercase-names --expect DIGEST_FROM_PREVIEW

Exit codes: 0 applied, 130 cancelled and rolled back, 1 failed and rolled back, or recovery is needed.

maintenance status

Shows whether an unfinished maintenance operation is waiting. It does not change the folders.

modsync maintenance status --game-dir <folder> --source-dir <folder> [--json]
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None
--jsonnonePrints one structured result.Off

Example:

modsync maintenance status --game-dir /path/to/game --source-dir /path/to/mods --json

maintenance recover

Finishes the unfinished maintenance operation that matches the digest you give.

modsync maintenance recover --game-dir <folder> --source-dir <folder> --operation <digest> [--json]
OptionValueWhat it doesDefault
--game-dirfolderYour game folder. Required.None
--source-dirfolderYour mod folder. Required.None
--operationdigestThe digest that identifies the pending operation. Required.None
--jsonnonePrints one structured result.Off

Example:

modsync maintenance recover --game-dir /path/to/game --source-dir /path/to/mods --operation DIGEST_FROM_STATUS

Authoring history (easy)

The easy commands keep a guide's edits in a saved history with undo and redo. Every change is saved as you go. Run as modsync easy <action>. Most actions work on a session folder, which is the folder that holds the saved history.

Revision checks. Several actions take --expected-revision. Give the revision you last saw. If someone else changed the guide since then, the command refuses to act, so you do not overwrite their work.

easy create

Starts a new session from a guide. Your current selections are kept.

modsync easy create <directory> <input>
ArgumentValueWhat it doesDefault
<directory>folderThe session folder to create. Required.None
<input>fileThe guide to start from. Required.None

Example:

modsync easy create my-session guide.toml

easy status

Shows the current revision and the labels of saved changes.

modsync easy status <directory>
ArgumentValueWhat it doesDefault
<directory>folderThe session folder. Required.None

Example:

modsync easy status my-session

easy edit

Applies a list of edits to the guide and saves the result as a new revision with a label.

modsync easy edit <directory> <operations> --label <text> [--expected-revision <revision>]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
<operations>file (JSON), or -The list of edits, in order. Use - to read it from standard input (up to 8 MiB). Required.None
--labeltextA short name for this change, shown in the history. Required.None
--expected-revisionrevisionRefuses the edit if the guide has changed since this revision.No check

Example:

modsync easy edit my-session edits.json --label "Add texture pack" --expected-revision REVISION_ID

easy undo

Goes back to the previous saved revision of the guide. It does not change any installed files.

modsync easy undo <directory> [--expected-revision <revision>]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
--expected-revisionrevisionRefuses the step if the guide has changed since this revision.No check

Example:

modsync easy undo my-session

easy redo

Moves forward again to the next saved revision. It does not change any installed files.

modsync easy redo <directory> [--expected-revision <revision>]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
--expected-revisionrevisionRefuses the step if the guide has changed since this revision.No check

Example:

modsync easy redo my-session

easy export

Saves the current guide to a file. The history is not changed.

modsync easy export <directory> <output>
ArgumentValueWhat it doesDefault
<directory>folderThe session folder. Required.None
<output>fileWhere to save the guide. Required.None

Example:

modsync easy export my-session exported-guide.toml

easy import-archive

Copies an archive into the session privately, and saves that in the history so you can undo it.

modsync easy import-archive <directory> <source> [--max-bytes <bytes>]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
<source>fileThe archive to import. Required.None
--max-bytesbytesLargest archive size to accept.8 GiB (8589934592)

Example:

modsync easy import-archive my-session /path/to/mods/texture-pack.7z

easy apply

Runs exactly one saved action from the history, the next one, with a checkpoint that can be recovered. It uses linked OdyPatcher by default. External patcher executables require process permission.

modsync easy apply <directory> --source-dir <folder> --game-dir <folder> --component <number> --instruction <number> [options]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
--source-dirfolderYour mod folder. Required.None
--game-dirfolderYour game folder. Required.None
--componentnumberThe component to act on. Required.None
--instructionnumberThe instruction to run inside that component. Required.None
--allow-processesnoneAllows external patcher executables and other programs to run, using your user permissions.Off
--patcherfileThe patcher program to use.Built-in
--expected-revisionrevisionRefuses to run if the guide has changed since this revision.No check
--provided-request-dirfolderA private folder of request files that explicitly selects the installers you supply. Cannot be used with --patcher. Needs --provided-xvfb.None
--provided-xvfbfileAn installed Xvfb program. A new display is started for each run. Needs --provided-request-dir.None
--provided-wine, --provided-wineserver, --provided-wine-prefixfile or folderThe Wine program, wineserver and Wine prefix to use with the supplied installers. Each needs --provided-request-dir.None

Example:

modsync easy apply my-session --source-dir /path/to/mods --game-dir /path/to/game --component 0 --instruction 0

easy disk-recover

Recovers the checkpoint that belongs to the action still pending in the session. Only that checkpoint is touched.

modsync easy disk-recover <directory>
ArgumentValueWhat it doesDefault
<directory>folderThe session folder. Required.None

Example:

modsync easy disk-recover my-session

easy disk-seek

Puts the game and mod folders back to a saved point in the history. The installation steps are not run again.

modsync easy disk-seek <directory> <cursor>
ArgumentValueWhat it doesDefault
<directory>folderThe session folder. Required.None
<cursor>numberThe saved point to return to. Required.None

Example:

modsync easy disk-seek my-session 3

easy patcher-inspect

Reads a mod's patcher details, its options, and a summary of its instructions. Nothing is changed.

modsync easy patcher-inspect <source> --source-dir <folder> --game-dir <folder> [options]
Argument or optionValueWhat it doesDefault
<source>textThe mod to inspect. Required.None
--source-dirfolderYour mod folder. Required.None
--game-dirfolderYour game folder. Required.None
--namespacenumberThe namespace index to read.Not set
--directoryfolderA saved session folder to read from. Use it together with --component and --instructions.None
--componentnumberThe component to read, with --directory.None
--instructionsnumberThe saved point to inspect, with --directory. Earlier archive steps are included.None

Example:

modsync easy patcher-inspect "Some Mod" --source-dir /path/to/mods --game-dir /path/to/game

easy diff

Compares two folder trees, byte for byte. Nothing is excluded unless you ask.

modsync easy diff <left> <right> [--exclude <path>]...
Argument or optionValueWhat it doesDefault
<left>folderThe first tree. Required.None
<right>folderThe second tree. Required.None
--excluderelative pathA file or folder to leave out on both sides. Repeat for more.Nothing excluded

Example:

modsync easy diff /path/to/before /path/to/after --exclude Logs

easy predict

Shows which files an instruction would create or change, at a chosen point. The install folders are not changed.

modsync easy predict <directory> --source-dir <folder> --game-dir <folder> --component <number> --instructions <number> [--expected-revision <revision>]
Argument or optionValueWhat it doesDefault
<directory>folderThe session folder. Required.None
--source-dirfolderYour mod folder. Required.None
--game-dirfolderYour game folder. Required.None
--componentnumberThe top-level mod, counting from zero. Required.None
--instructionsnumberHow many of that mod's instructions to simulate. Required.None
--expected-revisionrevisionRefuses the prediction if the guide has changed since this revision.No check

Example:

modsync easy predict my-session --source-dir /path/to/mods --game-dir /path/to/game --component 0 --instructions 2

Common recipes

These short workflows combine the commands above.

Validate in a script and read the result

Use this when another program needs to decide whether a guide is ready. Validation prints a JSON report. The command exits with 1 when the report does not pass.

  1. Run validation with JSON output, and save the report to a file.

    modsync validate --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --output json > report.json
  2. Check the exit code. 0 means the report passed, and 1 means it did not.

    if modsync validate --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --output json > report.json; then
      echo "Guide is ready"
    else
      echo "Guide has problems, see report.json"
    fi
  3. Read the success and errorCount fields in report.json if you need details.

Install only some components

Repeat --select for each component you want, and --option for each option. Repeating the flag is safer than listing many values after one flag, because the list ends at the next flag.

  1. Check the names and GUIDs first with list or selection.

    modsync selection --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --select "Another Mod" --json
  2. Validate the same selection.

    modsync validate --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --select "Another Mod" --option OPTION_GUID
  3. Install with the same options.

    modsync install --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --select "Another Mod" --option OPTION_GUID

Recover after a failed install

When an install stops, the folders are not left half-changed. Restore them first, then fix the cause and run again.

  1. Put both folders back to the snapshot from before the install.

    modsync restore --game-dir /path/to/game --source-dir /path/to/mods
  2. Fix the cause that the error message named, such as a missing archive.

  3. Validate again, then install from the start of the guide. Do not add a failed mod to the end of a run.

    modsync validate --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods
    modsync install  --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods

Install from a saved profile

Save your setup once, then reuse it. Explicit options you add still override the profile.

modsync profile --action capture --name "Full Build" --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods
modsync profile --action activate --name "Full Build"
modsync validate --active-profile
modsync install --active-profile

See which files clash before you install

The conflicts report lists every game file written by more than one component, in install order. Use it to decide which mod should win.

modsync conflicts --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods > conflicts.json

Check a download against a known hash

Give --sha256 with the hash from the guide. A file that does not match is not saved.

modsync download https://example.org/mod.zip /path/to/mods/mod.zip --sha256 EXPECTED_HASH