Skip to content

Disunity CLI

scottbot95 edited this page Aug 21, 2019 · 2 revisions

The CLI is not yet released and as such everything on this page is subject to change

The command line interface provided by Disunity for managing the mods and profiles via the command line.

target Commands

These commands allow the user to manage which targets are being tracked and provide various information about the tracked targets.

init - Begin tracking a target

Synopsis:

disunity target init <target-executable> [--distro <version>]

Example:

disunity target init Target.exe

Configures a target with the disunity mod loader and setups the default profile. The target executable may be either a relative or absoulte path. Optionally, the --distro flag can be used to specify the specific version of the disunity distro to use.

drop - Stop tracking a target

Synopsis:

disunity target drop <target-executable|target-id>

Example:

disunity target drop Target.exe

Uninstalls the disunity mod loader from the specified target and clean-up the managed files for the specified target. You may specify the target either by providing the path to the target executable (absoulte or relative), or by providing the ID of the target as given by disunity target ls

ls - List tracked targets

Synopsis:

disunity target ls [-l]

Example:

disunity target ls

Lists information about the tracked targets. By default the following information is listed:

  • Name
  • ID

If the -l option is provided, the following additional fields will be printed:

  • Full target path

mod Commands

These commands allow the user to manage their installed mods for all their tracked targets

add - Install a mod into a target profile

Synopsis:

disunity mod add <target-executable|target-id> <author>/<mod> [--maxVersion <version>] [--minVersion <version>] [--profile,-p <profile>]

Example:

disunity mod add Target.exe disunity-hq/example-mod --version >1.0.0

Adds a mod to a profile for the given target. If no profile is specified with --profile then the mod will be added to the active profile. If the mod does not exist in the cache, it will be downloaded from the disunity store. The latest version allowed by --maxVersion will be added, defaulting to the most recent version.

The version requirements specified by --minVersion and --maxVersion will be saved so that the added version can be changed in the future to satisfy requirements of mods added later.

remove - Removes a mod from a target profile

Synopsis:

disunity mod remove <target-executable|target-id> <author>/<mod> [--profile,-p <profile>]

Example:

disunity mod remove Target.exe disunity-hq/example-mod

Removes the given mod from the target profile. If no profile is specified by --profile, then the mod will be removed from the active profile.

ls - Lists the mods installed in a given profile

Synopsis:

disunity mod ls <target-executable|target-id> [--profile,-p <profile>]

Example:

disunity mod ls Target.exe --profile default

Lists the installed mods and their resolved versions in the given profile or the active profile if one is not specifed by --profile

update - Update installed mods to latest versions

Synopsis:

disunity mod update <target-executable|target-id> [--profile,-p <profile>]

Example:

disunity mod update Target.exe -p default

Reruns the version resolver against the version constraints and updates all mods to their latest allowed versions. This command is very helpful if you manually edit the meta.json file.

profile Commands

These commands allow users to manage and switch profiles.

new - Create a new profile

Synopsis:

disunity profile new <target-executable|target-id> <profile-name> [--copy-from <profile>] [--activate]

Example:

disunity profile new Target.exe vanilla
disunity profile new Target.exe my-profile --copy-from default

Creates a new profile with the given name for a target. If --copy-from is provided, the profile will be a copy of the specified profile. If the --activate flag is given, then the profile will be activated after creation.

activate - Set active profile

Synopsis:

disunity profile activate <target-executable|target-id> <profile-name>

Example:

disunity profile activate Target.exe vanilla

Sets the given profile as active.

delete - Deletes an existing profile

Synopsis:

disunity profile new <target-executable|target-id> <profile-name>

Example:

disunity profile new Target.exe my-profile

Deletes an existing profile.

NOTE: This cannot be used on the default profile.