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 ....
| Option | What it does |
|---|---|
-v, --verbose | Adds diagnostic log lines on stderr. Structured output on stdout stays the same, so scripts are not affected. |
--plaintext | Uses plain text progress output. This is already the default for the command line. |
-h, --help | Shows help for the command you name, or for everything when no command is given. |
-V, --version | Prints the version number. |
Running modsync with no command opens the desktop app, the same as modsync gui.
Exit codes
| Code | Meaning |
|---|---|
0 | The command finished and succeeded. |
1 | The command failed. A message starting with Error: is printed on stderr. A validation report that does not pass also exits with 1. |
130 | The 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
--jsonprint 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-jsonprints 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The 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]
| Option | Value | What it does | Default |
|---|---|---|---|
-i, --input | file | The guide. Required. | None |
-g, --game-dir | folder | Your game folder. Lets ModSync apply the Aspyr-only rules. Without it, those rules are only reported. | None |
--source-dir | folder | Your mod folder. Inspects the local archives the same way the desktop app does. Needs --game-dir. | None |
--use-file-selection | none | Uses the IsSelected values in the guide. | Off. All top-level components are selected. |
--select | name, GUID, category:Name or tier:Name | Selects components. Repeat the flag, or list several values after one flag. | None |
--option | GUID | Turns on an option and its parent mod. Repeat for more options. | None |
--deselect | name or GUID | Removes a mod. Mods that depend on it are removed too. Repeatable. | None |
--deselect-option | GUID | Removes an option. Anything that depends on it is removed too. Repeatable. | None |
--select-through-tier | tier | Adds base mods in that tier and every higher tier. Repeatable. | None |
--add-category | category | Adds base mods in that category. Ignores upper and lower case. Repeatable. | None |
--select-visible-search | text | Adds base mods whose shown name or description contains the text. Repeatable. | None |
--spoiler-free | none | Makes the text search above use the spoiler-free names and descriptions. | Off |
--receipt | none | Adds a selection receipt that can be compared later. Hashes the mod folder, so it can be slow. Needs --json and --source-dir. | Off |
--json | none | Prints 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.
| Option | Value | What it does | Default |
|---|---|---|---|
-i, --input | file | The guide. Required, unless you use --profile or --active-profile. | None |
-g, --game-dir | folder | Your game folder. Required, unless you use a profile that already has it. | None |
-s, --source-dir | folder | The folder that holds the downloaded mod archives. | The folder that contains the guide |
-d, --download | none | Downloads the selected resources before validation and the snapshot. Install only. | Off |
--concurrent | none | Uses four download workers instead of one. Needs --download. | One worker |
--nexus-mods-api-key | key | Nexus Mods API key for downloads. Also accepted as --nexus-api-key. | The key in your settings |
--download-timeout-hours | whole hours | Longest time the download step may take. Zero uses the 48-hour default. | 48 |
--profile | name | Applies a saved profile before your explicit options. Cannot be used with --active-profile. | None |
--active-profile | none | Uses the profile that is currently active in the settings. Fails if none is set. | Off |
--settings-dir | folder | The folder that holds settings and profiles. | The ModSync settings folder for your platform |
--use-file-selection | none | Uses the IsSelected values in the guide. | Off. All top-level components are selected. |
--select | name, GUID, category:Name or tier:Name | Selects components. Repeat the flag, or list several values after one flag. Selections are applied in the order you type them, together with --option. | None |
--option | GUID | Turns on an option. Existing option selections are kept. | None |
--deselect, --deselect-option, --select-through-tier, --add-category, --select-visible-search, --spoiler-free | as for selection | Same selection changes as the selection command. They are applied after --select. | None |
--fomod-choices | file | A saved FOMOD choices file (version 1) for this run. It is not saved back to disk. | None |
--pause-file | file | While 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-skip | none | Skips the FOMOD setup step. Installers that are still unresolved stop the run. | Off |
--interactive | none | Asks you to set up FOMOD installers in the terminal. | Off |
--non-interactive | none | Turns off the terminal FOMOD prompts. Cannot be used with --interactive. | Off |
--allow-processes | none | Allows external patcher executables and Execute/Run programs, using your user permissions. Linked OdyPatcher runs within ModSync. | Off |
--patcher | file | Explicit external patcher executable, overriding the saved path. Also accepted as --kpatcher-path or --odypatcher-path. | Saved executable, otherwise linked OdyPatcher |
--patcher-engine | ody-patcher, k-patcher or holo-patcher | Which patcher backend runs patcher steps. Not case sensitive. | Saved backend, otherwise OdyPatcher |
--direct-markdown | none | Installs a Markdown guide in the order it is written. Install only. Cannot be combined with selection, profile or FOMOD options. | Off |
--phase | all, base or remaining | Runs all selected components, only the base build, or the verified remaining part after a checkpoint. | all |
--managed | none | Uses managed deployment. Needs --component-checkpoints. Install only. | Off |
--no-managed | none | Installs without managed deployment. Install only. Cannot be used with --managed. | Off |
--staging-dir, --manifest-dir | folders | Folders for managed deployment. Use both together, with --managed. | None |
--component-checkpoints | none | Keeps a verified checkpoint after each top-level component finishes. Install only. | Off |
--no-checkpoint | none | Keeps recovery for the whole run only, with no per-component history. Cannot be used with the two options above. Install only. | Off |
--scratch-dir | folder | A folder for temporary archive files. It must already exist and be outside both the game and mod folders. | The system temporary folder |
--max-expanded-bytes | bytes | Largest size one archive may expand to. Extraction also checks free space in the scratch folder. | No limit |
--json | none | install 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-json | none | Prints typed progress lines on stdout. Install only. Cannot be used with --json. | Off |
--output | text or json | Output format for the validation report. Use json for a single pretty-printed report. Validate only. | text |
--validation-report | none | Prints the validation report as JSON. Same as --output json. Validate only. | Off |
--errors-only | none | Hides successful stages and warnings in text output. Validate only. | Off |
--full | none | Adds the environment, conflict and install-order checks. Validate only. | Off |
--dry-run | none | Adds a dry run that changes nothing, and includes its result in the report. Validate only. | Off |
--dry-run-only | none | Runs 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>
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--json | none | Prints 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<archive> | file | The mod archive to read. Required. | None |
--choices | file | Applies the matching entry from a saved FOMOD choices file (version 1). | None |
--extracted-directory | relative path | Adds copy steps for this folder inside the mod. | None |
--save-choices | file | Saves your current selections to a reusable choices file (version 1). | None |
--interactive | none | Asks you to pick plugin options in the terminal. Prompts go to stderr. | Off |
--scratch-dir | folder | A folder for temporary files. Must already exist. | The system temporary folder |
--max-expanded-bytes | bytes | Largest 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
--patcher | file | The HoloPatcher program to run. | None |
--allow-processes | none | Lets the program run with your user permissions. Required. | Off |
-a, --args | text | Arguments as one string. Split without a shell. Cannot be used with the arguments after --. | None |
--working-directory | folder | The folder the program starts in. | None |
--timeout-seconds | 1 to 86400 | Stops the program after this many seconds. | 3600 |
-- ... | arguments | Passes 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--force | none | Accepted, 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
| Option | Value | What it does | Default |
|---|---|---|---|
<input>, -i, --input | file | The guide to convert. Give it as a position or with the flag. | None |
<output>, -o, --output | file | Where to save the result. If left out, the result is printed to the terminal. | Terminal |
--stdin | none | Reads the guide from standard input (up to 8 MiB). Cannot be used with an input file. | Off |
-f, --format | toml, json, yaml or xml | The format to write. | toml |
--parse-directions | none | Drafts instructions from the written directions. Generated steps must be reviewed before you install. | Off |
--review-draft | component GUID | Marks a component's drafts as reviewed. Repeat for more components. | None |
--review-verified-drafts | none | Marks 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-errors | none | Sorts 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.
| Option | Value | What it does | Default |
|---|---|---|---|
--fomod-choices | file | FOMOD choices (version 1) used during the download step. | None |
--fomod-skip | none | Skips FOMOD setup after downloads. Installers that are still unresolved block processing. | Off |
--interactive, --non-interactive | none | Turns FOMOD terminal prompts on or off. Cannot be used together. | Off |
-s, --select | name, GUID, category:Name or tier:Name | Chooses which components are kept in the output. Repeatable. | None |
-d, --download | none | Downloads every resource in the guide before writing output. Needs --source-path. | Off |
--concurrent | none | Uses four download workers. Needs --download. | One worker |
--source-path | folder | The folder with your downloaded archives. | None |
--auto-generate-local | none | Creates missing instructions from the archives in --source-path. Input archives are never deleted. Needs --source-path. | Off |
-a, --auto | none | Creates instructions from file names of resources the guide already resolved, marked for review. Cannot be used with --resolved-archives. | Off |
--resolved-archives | file (JSON array) | Links named archives in --source-path to component GUIDs. Needs --source-path. | None |
--archive-map | file (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-key | key | Nexus Mods API key for downloads. | The key in your settings |
--settings-dir | folder | The folder that holds settings and profiles. | The ModSync settings folder for your platform |
--spoiler-free | Markdown file | Adds 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]
| Option | Value | What it does | Default |
|---|---|---|---|
<existing>, -e, --existing | file | The guide you already have. Give it as a position or with the flag. | None |
<incoming>, -n, --incoming | file | The guide with new or changed content. | None |
[output], -o, --output | file | Where to save the merged guide. | Terminal |
-f, --format | format | Format of the merged guide. | TOML |
--use-existing-order | none | Keeps the order of components in the existing guide. | Off |
--prefer-existing-fields | none | Keeps 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-options | none | Keeps the existing guide's value for that one field. | Off |
--prefer-existing-resource-registry | none | Keeps the existing guide's resource links. Also accepted as --prefer-existing-modlinks. | Off |
--prefer-incoming-fields | none | Accepted for older scripts. Incoming values already win by default. | Incoming wins |
--ignore-errors | none | Accepted for older scripts. Merging does not sort dependencies. | Off |
--exclude-existing-only | none | Leaves out components that appear only in the existing guide. | Off |
--exclude-incoming-only | none | Leaves 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<existing> | file | The guide you already have. Required. | None |
<incoming> | file | The guide with new content. Required. | None |
--options | file (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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<existing> | file | The same existing guide you previewed. Required. | None |
<incoming> | file | The same incoming guide you previewed. Required. | None |
<preview> | file | The preview file saved from merge-preview. Required. | None |
<output> | file | Where 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide with generated drafts. Required. | None |
<component> | component name or GUID | The 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide to edit. Required. | None |
<operations> | file (JSON) | The list of edits to apply, in order. Required. | None |
<output> | file | The 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide to add to. Required. | None |
<document> | file | The component document to preview. Required. | None |
--format | auto or a format name | Format of the document. auto detects it. | auto |
--regex-profile | file | A limited custom regex profile. The output shows the matches. Cannot be used with --format. | None |
--replace | component name or GUID | Replaces this component. Cannot be used with --parent or --index. | None |
--parent | component name or GUID | Adds the new component under this parent. | None |
--index | number | Position 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide you previewed. Required. | None |
<preview> | file | The preview saved from guide-import-preview. Required. | None |
<output> | file | Where 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide. Required. | None |
<component> | component name or GUID | The component to look at. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--game-dir | folder | Your game folder. Required. | None |
--max-expanded-bytes | bytes | Largest 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide. Required. | None |
--settings-dir | folder | The 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide to update. Required. | None |
<versions> | file (JSON) | Version data keyed as game/modId. Required. | None |
<output> | file | Where to save the updated guide. Required. | None |
--summary | file | Also 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide to check. Required. | None |
<output> | file | Where to save the updated guide. Required. | None |
--nexus-mods-api-key | key | Uses this key instead of the one in your settings. | The key in your settings |
--settings-dir | folder | The 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.
| Option | Value | What it does | Default |
|---|---|---|---|
--peer-proxy | socks5://IP:PORT | A SOCKS5 proxy for every peer and tracker connection. Repeat to add fallbacks. | None |
--peer-proxy-list-url | URL, or "" | A public proxy list to try when none of your proxies work. Pass "" to turn this off. | The monosans proxy list |
--tracker-list-url | HTTP or HTTPS URL | A tracker list to use. Repeat for more lists. | The ngosang HTTP and HTTPS lists |
--no-proxy | none | Connects to peers directly. Peers can see your IP address. Opens a listening port, and uses DHT and UPnP. | Off |
--upload-kibps | KiB per second (16 or more) | Caps how fast you upload while sharing. | 100 |
--no-upload-while-downloading | none | Downloads from peers without uploading to them. | Off |
--share-hours | hours (0 for no limit) | Stops sharing after this many hours. Used with --authored-magnet. | 24 |
--share-ratio | ratio (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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | HTTPS link | The archive's address. Required. | None |
<output> | file | Where to save the archive. Required. Existing files are not overwritten. | None |
--source-dir | folder | Your mod folder. Coordinates nested outputs with installs and maintenance on this folder. | None |
--sha256 | hash | The expected SHA-256 hash. The download fails if it does not match. | No check |
--max-expanded-bytes | bytes | Largest 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>]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide. Required. | None |
--component | component name or GUID | The component. Required. | None |
--url | URL | The download page the file names came from. Required. | None |
--filename | file name | A file name the page offers. Repeat for each one, in order. | None |
--source-dir | folder | Your 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | HTTP or HTTPS link | The 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file (JSON array) | The download jobs, as a JSON array. Required. | None |
--source-dir | folder | Every output must be inside this mod folder. It must already exist. | None |
--workers | number | How many downloads run at once. | 4 |
--retries | number | How many times to retry a failed download. | 1 |
--scratch-dir | folder | A folder for temporary files. Must already exist. | Not set |
--max-expanded-bytes | bytes | Largest 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--input | file | The guide. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--game-dir | folder | Your game folder. Lets ModSync apply the Aspyr-only rules. | None |
--use-file-selection | none | Uses the IsSelected values in the guide. | Off. All top-level components are selected. |
--select | name, GUID, category:Name or tier:Name | Selects components. Repeat the flag, or list several values after one flag. | None |
--option | GUID | Turns on an option and its parent mod. Repeatable. | None |
--deselect, --deselect-option, --select-through-tier, --add-category, --select-visible-search, --spoiler-free | as for selection | Same selection changes as the selection command. | None |
--workers | number | How many downloads run at once. | 4 |
--retries | number | How many times to retry a failed download. | 1 |
--nexus-mods-api-key | key | Nexus Mods API key for downloads. | The key in your settings |
--settings-dir | folder | The folder that holds settings and profiles. | The ModSync settings folder for your platform |
--peer-mode | off, race or fallback | Chooses 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-dir | folder | A folder for temporary files outside the game and mod folders. Must already exist. | The system temporary folder |
--max-expanded-bytes | bytes | Largest size each archive may expand to. | No limit |
--dry-run | none | Prints the plan and stops. Downloads, records and saves nothing. | Off |
--progress-json | none | Prints one JSON event per line as it works, then one summary line. | Off |
--record | none | Saves the acquisition details, and any FOMOD choices and status changes you accept, back into the guide. | Off |
--fomod-skip | none | Leaves FOMOD installers unconfigured and marks them as dismissed. | Off |
--fomod-choices | file | FOMOD choices (version 1). Overrides the MODSYNC_FOMOD_CHOICES environment variable. | None |
--interactive, --non-interactive | none | Asks 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | nxm:// link | The link to resolve. Required. | None |
<output> | file, or folder with --input | Where to save the archive. With --input, this is the mod folder instead. | None |
--source-dir | folder | The mod folder for a nested archive. Cannot be used with --input. | None |
--input | file | The guide to match the link against. Prints the run report. | None |
--record | none | Writes the matched file back into the guide. Needs --input. | Off |
--nexus-mods-api-key | key | Nexus Mods API key to use. | The key in your settings |
--settings-dir | folder | The 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<archive> | file | The archive to share. Required. | None |
--tracker | HTTP or HTTPS announce URL | A tracker to announce to. Repeat to add fallbacks. | Built-in tracker lists |
--authored-magnet | magnet link | Shares under this magnet link, instead of creating a new torrent. Use it with --torrent-info. | None |
--torrent-info | base64 text | The saved torrent info from your guide. Shared as it is. Needs --authored-magnet. | None |
| Privacy options | see above | The 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<magnet> | magnet link | The link from the guide. Required. Quote it in your shell. | None |
<output> | file | Where to save the archive. Required. | None |
--sha256 | hash | The expected SHA-256 hash. The torrent is thrown away if it does not match. Required. | None |
--torrent-info | base64 text | The torrent info saved in the guide. | None |
--peer | address and port | A known seeder, from torrent-seed output. Repeat for fallbacks. | None |
--source-dir | folder | Your mod folder. Coordinates nested outputs with installs and maintenance on this folder. | None |
--max-expanded-bytes | bytes | Largest size the archive may expand to during the check. | No limit |
| Privacy options | see above | The 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]
| Argument | Value | What it does | Default |
|---|---|---|---|
<archive> | file | The local archive to check. Required. | None |
<magnet> | magnet link | The magnet link from the guide. Required. | None |
--sha256 | hash | The expected SHA-256 hash. | No check |
--torrent-info | base64 text | The torrent info saved in the guide. | None |
--max-expanded-bytes | bytes | Largest 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]
| Option | Value | What it does | Default |
|---|---|---|---|
-a, --action | list, show, create, clone, rename, delete, activate, capture or apply | What to do. Not case sensitive. | list |
-n, --name | text | Profile name. Used by most actions. For clone and rename, it can stand in for --from. | None |
--from | text | The profile to copy or rename from. | None |
--to | text | The new profile name, for clone and rename. | None |
--input | file | The guide. Required for capture. Used by apply. | None |
--output | file | Where apply saves the guide with the profile's selections. | None |
--game-dir | folder | Your game folder, saved with the profile by capture. | None |
--source-dir | folder | Your mod folder, saved with the profile by capture. | None |
--settings-dir | folder | The folder that holds settings and profiles. | The ModSync settings folder for your platform |
--json | none | Prints the result as JSON. Without it, the result is a short text summary. | Off |
Notes:
show,create,delete,activateandcapturetake--name.cloneandrenametake--fromand--to.captureupdates an existing profile and keeps its creation time.activatesaves 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]
| Option | Value | What it does | Default |
|---|---|---|---|
-a, --action | inspect, list, get or set | inspect shows the main settings. list shows every key. get reads one key. set writes one key. Required. | None |
-k, --key | text | The key to read or write. Needed for get and set. | None |
--value | text | The 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-dir | folder | The folder that holds settings.json. | The ModSync settings folder for your platform |
--json | none | Prints JSON instead of text. | Off |
--reveal-secrets | none | Shows 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 option | Value | What it does | Default |
|---|---|---|---|
<api-key> | text | Your personal Nexus Mods API key. Required. | None |
--skip-validation | none | Saves the key without checking it first. | Off |
--settings-dir | folder | The folder that holds settings.json. | The ModSync settings folder for your platform |
--json | none | Prints 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 option | Value | What it does | Default |
|---|---|---|---|
list | none | Prints every build as JSON, with its key, name, game and link. | None |
add | --label, --game, --url | Adds 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 | --key | Removes a build you added and its saved copy. The community builds cannot be removed. | None |
fetch | --key, --refresh | Prints 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-dir | folder | The 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 option | Value | What it does | Default |
|---|---|---|---|
<archive> | file | A ZIP, 7z or RAR mod archive. Required. | None |
--source-dir | folder | The mod folder the archive is placed in. Required. | None |
--output | file | Where to write the guide. Required. | None |
--name | text | The 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 option | Value | What it does | Default |
|---|---|---|---|
<url> | link | A DeadlyStream or Nexus Mods mod page. Required. | None |
--settings-dir | folder | The 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--json | none | Prints 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
--username | text | Your DeadlyStream user name. Required. | None |
--save | none | Keeps the signed-in session for later downloads. | Off |
--settings-dir | folder | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
--settings-dir | folder | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
--settings-dir | folder | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
--repo | owner/name | The repository to check. Required. | None |
--current | version | The version installed now. Required. | None |
--download | folder | Downloads 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>
| Option | Value | What it does | Default |
|---|---|---|---|
--changelog | file | The changelog to read. Required. | None |
--version | version | The 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.
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session to check. Required. | None |
--checkpoint | checkpoint ID | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session. Required. | None |
--checkpoint | checkpoint ID | The 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session both checkpoints belong to. Required. | None |
--from | checkpoint ID | The older checkpoint. Required. | None |
--to | checkpoint ID | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session. Required. | None |
--tree | mods or game | Which folder the path is in. Required. | None |
--path | relative path | The file or folder path to look up. Required. | None |
--checkpoint | checkpoint ID | The 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session. Required. | None |
--checkpoint | checkpoint ID | The 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
| All install options | see validate, install and conflicts | Accepts every option that install accepts. | See that table |
--session | session ID | The session whose checkpoint is the starting point. Required. | None |
--accept-source-changes | none | Accepts 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>]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The session to repair. Required. | None |
--checkpoint | checkpoint ID | The 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both folders are required. | None |
--session | session ID | The 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>
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Both 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.
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--staging-dir | folder | The folder that holds the mod files to deploy. | The profile's staging folder |
--manifest-dir | folder | The folder that holds the deployment records. | The profile's deployment folder |
--profile | name | The profile whose folders to use. | The active profile |
--settings-dir | folder | The 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]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--component | component folder name | The component folder inside the staging folder. Required. | None |
--name | text | An optional name for this deployment. | None |
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--component | component name | The deployment to remove. Required. | None |
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--component | component name | The staged component to delete. Required. | None |
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--out | file | Where to save the hash list. Required. | None |
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--component | component name | The component the changes belong to. Required. | None |
--before | file | The snapshot saved by deployment snapshot. Required. | None |
--name | text | A label for this deployment. | None |
--backup-source | folder | A copy of the game folder from before the patcher ran. Supplies the originals of changed files. | None |
| Folder options | see above | Which 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--to | profile name | The profile to activate. Required. | None |
--settings-dir | folder | The folder that holds settings and profiles. | The ModSync settings folder for your platform |
--purge-current | none | Removes 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--target | game or mods | Which folder to change. Required. | None |
--subtree | relative path | A folder inside the target. Use an empty string to pick the whole target folder. Required. | None |
--action | lowercase-names or owner-writable | lowercase-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 |
--json | none | Prints 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]
| Option | Value | What it does | Default |
|---|---|---|---|
| Preview options | see maintenance preview | The same target, subtree and action you previewed. | None |
--expect | digest | The 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--json | none | Prints 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]
| Option | Value | What it does | Default |
|---|---|---|---|
--game-dir | folder | Your game folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--operation | digest | The digest that identifies the pending operation. Required. | None |
--json | none | Prints 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder to create. Required. | None |
<input> | file | The 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The 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 |
--label | text | A short name for this change, shown in the history. Required. | None |
--expected-revision | revision | Refuses 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
--expected-revision | revision | Refuses 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
--expected-revision | revision | Refuses 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
<output> | file | Where 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
<source> | file | The archive to import. Required. | None |
--max-bytes | bytes | Largest 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--game-dir | folder | Your game folder. Required. | None |
--component | number | The component to act on. Required. | None |
--instruction | number | The instruction to run inside that component. Required. | None |
--allow-processes | none | Allows external patcher executables and other programs to run, using your user permissions. | Off |
--patcher | file | The patcher program to use. | Built-in |
--expected-revision | revision | Refuses to run if the guide has changed since this revision. | No check |
--provided-request-dir | folder | A private folder of request files that explicitly selects the installers you supply. Cannot be used with --patcher. Needs --provided-xvfb. | None |
--provided-xvfb | file | An installed Xvfb program. A new display is started for each run. Needs --provided-request-dir. | None |
--provided-wine, --provided-wineserver, --provided-wine-prefix | file or folder | The 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The 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>
| Argument | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
<cursor> | number | The 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 option | Value | What it does | Default |
|---|---|---|---|
<source> | text | The mod to inspect. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--game-dir | folder | Your game folder. Required. | None |
--namespace | number | The namespace index to read. | Not set |
--directory | folder | A saved session folder to read from. Use it together with --component and --instructions. | None |
--component | number | The component to read, with --directory. | None |
--instructions | number | The 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 option | Value | What it does | Default |
|---|---|---|---|
<left> | folder | The first tree. Required. | None |
<right> | folder | The second tree. Required. | None |
--exclude | relative path | A 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 option | Value | What it does | Default |
|---|---|---|---|
<directory> | folder | The session folder. Required. | None |
--source-dir | folder | Your mod folder. Required. | None |
--game-dir | folder | Your game folder. Required. | None |
--component | number | The top-level mod, counting from zero. Required. | None |
--instructions | number | How many of that mod's instructions to simulate. Required. | None |
--expected-revision | revision | Refuses 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
Desktop app and links
These commands open the desktop app, handle nxm:// and modsync:// links, and register those links with your system.
gui
Opens the built-in ModSync window. You can open it with a guide and folders already filled in, or reopen an easy-mode session. Running modsync with no command does the same thing. The KOTOR desktop app described on the Desktop app page is a separate program, built from desktop/tauri.
modsync gui [options]
| Option | Value | What it does | Default |
|---|---|---|---|
--input | file | Opens this guide. | None |
--game-dir | folder | Fills in the game folder. | The saved folder |
--source-dir | folder | Fills in the mod folder. | The saved folder |
--settings-dir | folder | Uses this folder for settings and profiles. | The ModSync settings folder for your platform |
--easy-session | folder | Reopens a saved easy-mode session once the app is ready. Cannot be used with --protocol. | None |
--protocol | nxm:// or modsync:// link | Handles a link passed in by your system's link handler. | None |
--allow-multiple-instances | none | Starts a separate app window instead of using the one already open. | Off |
Example:
modsync gui --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods
protocol-parse
Checks a link and shows what it means. It does not download anything.
modsync protocol-parse <url>
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | nxm:// or modsync:// link | The link to check. Required. | None |
Example:
modsync protocol-parse "modsync://EXAMPLE_LINK"
protocol-fetch
Downloads an instruction file from a web link and saves it. It has limits on address and size to protect you.
modsync protocol-fetch <url> <output>
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | HTTP or HTTPS link | The file to download. Required. | None |
<output> | file | Where to save the file. Required. | None |
Example:
modsync protocol-fetch https://example.org/guide.toml guide.toml
protocol-open
Downloads and loads a modsync:// instruction link, without keeping the temporary download.
modsync protocol-open <url>
| Argument | Value | What it does | Default |
|---|---|---|---|
<url> | modsync:// link | The instruction link to load. Required. | None |
Example:
modsync protocol-open "modsync://EXAMPLE_LINK"
protocol-resolve
Matches an nxm:// link to exactly one top-level component in a guide. It fails if the link matches none or more than one.
modsync protocol-resolve <input> <url>
| Argument | Value | What it does | Default |
|---|---|---|---|
<input> | file | The guide to search. Required. | None |
<url> | nxm:// link | The link to match. Required. | None |
Example:
modsync protocol-resolve guide.toml "nxm://kotor/mods/123/files/456"
protocol-register-linux
Registers modsync:// links with your Linux desktop, so a click opens this program. It prints the path of the file it wrote.
modsync protocol-register-linux <executable> [--applications-dir <folder>]
| Argument or option | Value | What it does | Default |
|---|---|---|---|
<executable> | file | The ModSync program to open. Required. | None |
--applications-dir | folder | Where to write the desktop entry. | The applications folder in your local data folder |
Example:
modsync protocol-register-linux /path/to/modsync
protocol status, register and unregister
Shows, adds or removes this program's link handlers for nxm:// and modsync://. Removing only affects links that this program owns.
modsync protocol status [options]
modsync protocol register [options]
modsync protocol unregister [options]
| Option | Value | What it does | Default |
|---|---|---|---|
--executable | file | The program to register. On Windows, when you leave this out, the modsync-gui.exe launcher in the same folder is used. | The program you are running |
--package-token | text | The package identity token to use. Read from the installed package if you leave it out. | Read from the package |
--channel | text | The channel name to use. Read from the installed package if you leave it out. | Read from the package |
--scheme | both, modsync or nxm | Which link types to handle. | both |
--replace | none | Replaces a different program that currently handles these links. Register only. | Off |
--json | none | Prints the result as JSON. | Off |
Example:
modsync protocol status --json
modsync protocol register --scheme modsync
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.
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.jsonCheck the exit code.
0means the report passed, and1means 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" fiRead the
successanderrorCountfields inreport.jsonif 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.
Check the names and GUIDs first with
listorselection.modsync selection --input guide.toml --game-dir /path/to/game --source-dir /path/to/mods --select "Some Mod" --select "Another Mod" --jsonValidate 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_GUIDInstall 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.
Put both folders back to the snapshot from before the install.
modsync restore --game-dir /path/to/game --source-dir /path/to/modsFix the cause that the error message named, such as a missing archive.
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