CLI parameters#

Help screen#

$ mpm --help
Usage: mpm [OPTIONS] COMMAND [ARGS]...

  Common CLI options for subcommands.

Package manager selection options:
  -m, --manager [apm|apt|apt-mint|brew|cargo|cask|choco|composer|dnf|emerge|flatpak|gem|mas|npm|opkg|pacaur|pacman|paru|pip|pipx|pkg|scoop|snap|steamcmd|vscode|yarn|yay|yum|zypper]
                      Restrict subcommand to a subset of managers. Repeat to
                      select multiple managers. The order is preserved for
                      priority-sensitive subcommands.
  -e, --exclude [apm|apt|apt-mint|brew|cargo|cask|choco|composer|dnf|emerge|flatpak|gem|mas|npm|opkg|pacaur|pacman|paru|pip|pipx|pkg|scoop|snap|steamcmd|vscode|yarn|yay|yum|zypper]
                      Exclude a manager. Repeat to exclude multiple managers.
  -a, --all-managers  Force evaluation of all managers recognized by mpm,
                      including those not supported by the current platform or
                      deprecated. Still applies filtering by --manager and
                      --exclude options before calling the subcommand.
  -x, --xkcd          Preset manager selection as defined by XKCD #1654.
                      Equivalent to: --pip --brew --npm --dnf --apt --steamcmd.
  --apm               Alias to --manager apm (deprecated).
  --apt               Alias to --manager apt.
  --apt-mint          Alias to --manager apt-mint.
  --brew              Alias to --manager brew.
  --cargo             Alias to --manager cargo.
  --cask              Alias to --manager cask.
  --choco             Alias to --manager choco.
  --composer          Alias to --manager composer.
  --dnf               Alias to --manager dnf.
  --emerge            Alias to --manager emerge.
  --flatpak           Alias to --manager flatpak.
  --gem               Alias to --manager gem.
  --mas               Alias to --manager mas.
  --npm               Alias to --manager npm.
  --opkg              Alias to --manager opkg.
  --pacaur            Alias to --manager pacaur.
  --pacman            Alias to --manager pacman.
  --paru              Alias to --manager paru.
  --pip               Alias to --manager pip.
  --pipx              Alias to --manager pipx.
  --pkg               Alias to --manager pkg.
  --scoop             Alias to --manager scoop.
  --snap              Alias to --manager snap.
  --steamcmd          Alias to --manager steamcmd.
  --vscode            Alias to --manager vscode.
  --yarn              Alias to --manager yarn.
  --yay               Alias to --manager yay.
  --yum               Alias to --manager yum.
  --zypper            Alias to --manager zypper.

Manager options:
  --ignore-auto-updates / --include-auto-updates
                               Report all outdated packages, including those
                               tagged as auto-updating. Only applies to outdated
                               and upgrade subcommands.  [default: ignore-auto-
                               updates]
  --stop-on-error / --continue-on-error
                               Stop right away or continue operations on manager
                               CLI error.  [default: continue-on-error]
  -d, --dry-run                Do not actually perform any action, just simulate
                               CLI calls.
  -t, --timeout INTEGER RANGE  Set maximum duration in seconds for each CLI
                               call.  [default: 500; x>=0]

Output options:
  --description         Show package description in results.
  -s, --sort-by [manager_id|manager_name|package_id|package_name|version]
                        Sort results.  [default: manager_id]
  --stats / --no-stats  Print per-manager package statistics.  [default: stats]
  -o, --output-format [asciidoc|csv|csv-excel|csv-excel-tab|csv-unix|double_grid|double_outline|fancy_grid|fancy_outline|github|grid|heavy_grid|heavy_outline|html|jira|json|latex|latex_booktabs|latex_longtable|latex_raw|mediawiki|mixed_grid|mixed_outline|moinmoin|orgtbl|outline|pipe|plain|presto|pretty|psql|rounded_grid|rounded_outline|rst|simple|simple_grid|simple_outline|textile|tsv|unsafehtml|vertical|youtrack]
                        Rendering mode of the output.  [default:
                        rounded_outline]

Xbar/SwiftBar options:
  --bar-plugin-path  Print location of the Xbar/SwiftBar plugin.

Other options:
  --time / --no-time        Measure and print elapsed execution time.  [default:
                            no-time]
  --color, --ansi / --no-color, --no-ansi
                            Strip out all colors and all ANSI codes from output.
                            [default: color]
  -C, --config CONFIG_PATH  Location of the configuration file. Supports glob
                            pattern of local path and remote URL.  [default:
                            ~/.config/mpm/*.{toml,yaml,yml,json,ini,xml}]
  --show-params             Show all CLI parameters, their provenance, defaults
                            and value, then exit.
  -v, --verbosity LEVEL     Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
                            [default: INFO]
  --version                 Show the version and exit.
  -h, --help                Show this message and exit.

Explore subcommands:
  managers            List supported package managers and their location.
  installed (list)    List installed packages.
  outdated            List outdated packages.
  search              Search packages.
  which (locate)      Locate CLIs on system.

Maintenance subcommands:
  install             Install a package.
  upgrade (update)    Upgrade packages.
  remove (uninstall)  Remove a package.
  sync                Sync local package info.
  cleanup             Cleanup local data.

Package snapshots subcommands:
  backup (lock, freeze, snapshot)
                      Save installed packages to a TOML file.
  restore             Install packages in batch as specified by TOML files.

Options#

mpm#

Common CLI options for subcommands.

mpm [OPTIONS] COMMAND [ARGS]...

Options

-m, --manager <manager>#

Restrict subcommand to a subset of managers. Repeat to select multiple managers. The order is preserved for priority-sensitive subcommands.

Options:

apm | apt | apt-mint | brew | cargo | cask | choco | composer | dnf | emerge | flatpak | gem | mas | npm | opkg | pacaur | pacman | paru | pip | pipx | pkg | scoop | snap | steamcmd | vscode | yarn | yay | yum | zypper

-e, --exclude <exclude>#

Exclude a manager. Repeat to exclude multiple managers.

Options:

apm | apt | apt-mint | brew | cargo | cask | choco | composer | dnf | emerge | flatpak | gem | mas | npm | opkg | pacaur | pacman | paru | pip | pipx | pkg | scoop | snap | steamcmd | vscode | yarn | yay | yum | zypper

-a, --all-managers#

Force evaluation of all managers recognized by mpm, including those not supported by the current platform or deprecated. Still applies filtering by –manager and –exclude options before calling the subcommand.

-x, --xkcd#

Preset manager selection as defined by XKCD #1654. Equivalent to: –pip –brew –npm –dnf –apt –steamcmd.

--apm#

Alias to –manager apm (deprecated).

--apt#

Alias to –manager apt.

--apt-mint#

Alias to –manager apt-mint.

--brew#

Alias to –manager brew.

--cargo#

Alias to –manager cargo.

--cask#

Alias to –manager cask.

--choco#

Alias to –manager choco.

--composer#

Alias to –manager composer.

--dnf#

Alias to –manager dnf.

--emerge#

Alias to –manager emerge.

--flatpak#

Alias to –manager flatpak.

--gem#

Alias to –manager gem.

--mas#

Alias to –manager mas.

--npm#

Alias to –manager npm.

--opkg#

Alias to –manager opkg.

--pacaur#

Alias to –manager pacaur.

--pacman#

Alias to –manager pacman.

--paru#

Alias to –manager paru.

--pip#

Alias to –manager pip.

--pipx#

Alias to –manager pipx.

--pkg#

Alias to –manager pkg.

--scoop#

Alias to –manager scoop.

--snap#

Alias to –manager snap.

--steamcmd#

Alias to –manager steamcmd.

--vscode#

Alias to –manager vscode.

--yarn#

Alias to –manager yarn.

--yay#

Alias to –manager yay.

--yum#

Alias to –manager yum.

--zypper#

Alias to –manager zypper.

--ignore-auto-updates, --include-auto-updates#

Report all outdated packages, including those tagged as auto-updating. Only applies to outdated and upgrade subcommands.

--stop-on-error, --continue-on-error#

Stop right away or continue operations on manager CLI error.

-d, --dry-run#

Do not actually perform any action, just simulate CLI calls.

-t, --timeout <timeout>#

Set maximum duration in seconds for each CLI call.

--description#

Show package description in results.

-s, --sort-by <sort_by>#

Sort results.

Options:

manager_id | manager_name | package_id | package_name | version

--stats, --no-stats#

Print per-manager package statistics.

--bar-plugin-path#

Print location of the Xbar/SwiftBar plugin.

--time, --no-time#

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi#

Strip out all colors and all ANSI codes from output.

-C, --config <CONFIG_PATH>#

Location of the configuration file. Supports glob pattern of local path and remote URL.

--show-params#

Show all CLI parameters, their provenance, defaults and value, then exit.

-v, --verbosity <LEVEL>#

Either CRITICAL, ERROR, WARNING, INFO, DEBUG.

Options:

CRITICAL | ERROR | WARNING | INFO | DEBUG

--version#

Show the version and exit.

-h, --help#

Show this message and exit.

-o, --output-format <output_format>#

Rendering mode of the output.

Options:

asciidoc | csv | csv-excel | csv-excel-tab | csv-unix | double_grid | double_outline | fancy_grid | fancy_outline | github | grid | heavy_grid | heavy_outline | html | jira | json | latex | latex_booktabs | latex_longtable | latex_raw | mediawiki | mixed_grid | mixed_outline | moinmoin | orgtbl | outline | pipe | plain | presto | pretty | psql | rounded_grid | rounded_outline | rst | simple | simple_grid | simple_outline | textile | tsv | unsafehtml | vertical | youtrack

Environment variables

('MPM_MANAGER',)

Provide a default for -m

('MPM_EXCLUDE',)

Provide a default for -e

('MPM_ALL_MANAGERS',)

Provide a default for -a

('MPM_XKCD',)

Provide a default for -x

('MPM_APM',)

Provide a default for --apm

('MPM_APT',)

Provide a default for --apt

('MPM_APT_MINT',)

Provide a default for --apt-mint

('MPM_BREW',)

Provide a default for --brew

('MPM_CARGO',)

Provide a default for --cargo

('MPM_CASK',)

Provide a default for --cask

('MPM_CHOCO',)

Provide a default for --choco

('MPM_COMPOSER',)

Provide a default for --composer

('MPM_DNF',)

Provide a default for --dnf

('MPM_EMERGE',)

Provide a default for --emerge

('MPM_FLATPAK',)

Provide a default for --flatpak

('MPM_GEM',)

Provide a default for --gem

('MPM_MAS',)

Provide a default for --mas

('MPM_NPM',)

Provide a default for --npm

('MPM_OPKG',)

Provide a default for --opkg

('MPM_PACAUR',)

Provide a default for --pacaur

('MPM_PACMAN',)

Provide a default for --pacman

('MPM_PARU',)

Provide a default for --paru

('MPM_PIP',)

Provide a default for --pip

('MPM_PIPX',)

Provide a default for --pipx

('MPM_PKG',)

Provide a default for --pkg

('MPM_SCOOP',)

Provide a default for --scoop

('MPM_SNAP',)

Provide a default for --snap

('MPM_STEAMCMD',)

Provide a default for --steamcmd

('MPM_VSCODE',)

Provide a default for --vscode

('MPM_YARN',)

Provide a default for --yarn

('MPM_YAY',)

Provide a default for --yay

('MPM_YUM',)

Provide a default for --yum

('MPM_ZYPPER',)

Provide a default for --zypper

('MPM_IGNORE_AUTO_UPDATES',)

Provide a default for --ignore-auto-updates

('MPM_STOP_ON_ERROR',)

Provide a default for --stop-on-error

('MPM_DRY_RUN',)

Provide a default for -d

('MPM_TIMEOUT',)

Provide a default for -t

('MPM_DESCRIPTION',)

Provide a default for --description

('MPM_SORT_BY',)

Provide a default for -s

('MPM_STATS',)

Provide a default for --stats

('MPM_BAR_PLUGIN_PATH',)

Provide a default for --bar-plugin-path

('MPM_TIME',)

Provide a default for --time

('MPM_COLOR',)

Provide a default for --color

('MPM_CONFIG',)

Provide a default for --config

('MPM_SHOW_PARAMS',)

Provide a default for --show-params

('MPM_VERBOSITY',)

Provide a default for --verbosity

('MPM_VERSION',)

Provide a default for --version

('MPM_HELP',)

Provide a default for --help

('MPM_OUTPUT_FORMAT',)

Provide a default for -o

backup#

Dump the list of installed packages to a TOML file.

By default the generated TOML content is displayed directly in the console output. So mpm backup is the same as a call to mpm backup -. To have the result written in a file on disk, specify the output file like so: mpm backup packages.toml.

Files produced by this subcommand can be safely consumed by mpm restore.

mpm backup [OPTIONS] [TOML_PATH]

Options

--overwrite, --force, --replace#

Allow the provided TOML file to be silently wiped out if it already exists.

--merge#

Read the provided TOML file and update each entry with the version currently installed on the system. Requires the [TOML_PATH] argument.

--update-version#

Read the provided TOML file and update each existing entry with the version currently installed on the system. Requires the [TOML_PATH] argument.

Arguments

TOML_PATH#

Optional argument

Environment variables

('BACKUP_OVERWRITE',)

Provide a default for --overwrite

('BACKUP_MERGE',)

Provide a default for --merge

('BACKUP_UPDATE_VERSION',)

Provide a default for --update-version

cleanup#

Cleanup local data, temporary artifacts and removes orphaned dependencies.

mpm cleanup [OPTIONS]

install#

Install one or more packages.

Installation will proceed first with packages unambiguously tied to a manager. You can have an influence on that with more precise package specifiers (like purl) and/or tighter selection of managers.

For other untied packages, mpm will try to find the best manager to install it with. Their installation will be attempted with each manager, in the order they were selected. If we have the certainty, by the way of a search operation, that this package is not available from this manager, we’ll skip the installation and try the next available manager.

mpm install [OPTIONS] PACKAGES_SPECS...

Arguments

PACKAGES_SPECS#

Required argument(s)

installed#

List all packages installed on the system by each manager.

mpm installed [OPTIONS]

Options

-d, --duplicates#

Only list installed packages sharing the same ID. Implies –sort_by package_id to make duplicates easier to compare between themselves.

Environment variables

('INSTALLED_DUPLICATES',)

Provide a default for -d

managers#

List all supported package managers and autodetect their presence on the system.

mpm managers [OPTIONS]

outdated#

List available package upgrades and their versions for each manager.

mpm outdated [OPTIONS]

Options

--plugin-output#

Output results for direct consumption by an Xbar/SwiftBar-compatible plugin. The layout is dynamic and depends on environment variables set by either Xbar or SwiftBar.

Environment variables

('OUTDATED_PLUGIN_OUTPUT',)

Provide a default for --plugin-output

remove#

Remove one or more packages.

Packages recognized by multiple managers will be remove with each of them. You can fine-tune this behavior with more precise package specifiers (like purl) and/or tighter selection of managers.

Packages unrecognized by any selected manager will be skipped.

mpm remove [OPTIONS] PACKAGES_SPECS...

Arguments

PACKAGES_SPECS#

Required argument(s)

restore#

Read TOML files then install or upgrade each package referenced in them.

mpm restore [OPTIONS] TOML_FILES...

Arguments

TOML_FILES#

Required argument(s)

sync#

Sync local package metadata and info from external sources.

mpm sync [OPTIONS]

upgrade#

Upgrade one or more outdated packages.

All outdated package will be upgraded by default if no specifiers are provided as arguments. I.e. assumes -A/–all option if no [PACKAGES_SPECS]….

Packages recognized by multiple managers will be upgraded with each of them. You can fine-tune this behavior with more precise package specifiers (like purl) and/or tighter selection of managers.

Packages unrecognized by any selected manager will be skipped.

mpm upgrade [OPTIONS] [PACKAGES_SPECS]...

Options

-A, --all#

Upgrade all outdated packages. Will make the command ignore package IDs provided as parameters.

Arguments

PACKAGES_SPECS#

Optional argument(s)

Environment variables

('UPGRADE_ALL',)

Provide a default for -A

which#

Search from the user’s environment all CLIs matching the query.

This is mpm’s own version of the which -a UNIX command, used internally to locate binaries for each manager. It is exposed as a subcommand for convenience and to help troubleshoot CLI resolution logic.

Compared to the venerable which command, this will respect the additional path configured for each package manager. It will ignore files that are empty (0 size). On Windows, it additionally suppress the default lookup in the current directory, which takes precedence on other paths.

mpm which [OPTIONS] CLI_NAMES...

Arguments

CLI_NAMES#

Required argument(s)