Skip to main content

CLI unifying Homebrew, apt, Chocolatey, Pip, NPM, Composer and the like.

Project description

Last release Python versions Unittests status Documentation Status Coverage Status

What is Meta Package Manager?

https://raw.githubusercontent.com/kdeldycke/meta-package-manager/develop/docs/mpm-managers-cli.png
https://raw.githubusercontent.com/kdeldycke/meta-package-manager/develop/docs/mpm-outdated-cli.png

Features

  • Inventory and list all package managers available on the system.

  • Supports macOS, Linux and Windows.

  • List installed packages.

  • Search for packages.

  • Install a package.

  • List outdated packages.

  • Sync local package infos.

  • Upgrade all outdated packages.

  • Backup list of installed packages to TOML file.

  • Restore/install list of packages from TOML files.

  • Pin-point commands to a subset of package managers (include/exclude selectors).

  • Export results in JSON or user-friendly tables.

  • Shell auto-completion for Bash, Zsh and Fish.

  • Provides a xbar plugin for friendly macOS integration.

Supported package managers

Package manager

Min. version

macOS

Linux

Windows

sync

installed

search

install

outdated

upgrade

cleanup

Atom’s apm

1.0.0

apt

1.0.0

Linux Mint’s apt

1.0.0

Homebrew

2.7.0

Homebrew Cask

2.7.0

Chocolatey

0.10.4

composer

1.4.0

Flatpak

1.2.0

Ruby’s gem

2.5.0

Mac AppStore via mas

1.6.1

Node’s npm

4.0.0

opkg

0.2.0

Python pip

10.0.0

✘*

snap

2.0.0

Visual Studio Code

1.60.0

Node’s yarn

1.21.0

If you’re bored, feel free to add support for new package manager. See good candidates at:

Installation

This package is available on PyPi, so you can install the latest stable release and its dependencies with a simple pip call:

$ pip install meta-package-manager

Documentation

Docs are hosted on Read the Docs.

Usage

Examples of the package’s mpm CLI.

List global options and commands:

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

  CLI for multi-package manager upgrades.

Options:
  -m, --manager [composer|snap|brew|cask|mas|vscode|npm|yarn|apm|apt|apt-mint|flatpak|pip|gem|opkg|choco]
                                  Restrict sub-command to a subset of package
                                  managers. Repeat to select multiple
                                  managers.  [default: ]
  -e, --exclude [composer|snap|brew|cask|mas|vscode|npm|yarn|apm|apt|apt-mint|flatpak|pip|gem|opkg|choco]
                                  Exclude a package manager. Repeat to exclude
                                  multiple managers.  [default: ]
  -a, --all-managers              Force evaluation of all package manager
                                  implemented by mpm, even those notsupported
                                  by the current platform. Still applies
                                  filtering by --manager and --exclude options
                                  before calling the subcommand.  [default:
                                  False]
  --ignore-auto-updates / --include-auto-updates
                                  Report all outdated packages, including
                                  those tagged as auto-updating. Only applies
                                  to 'outdated' and 'upgrade' commands.
                                  [default: ignore-auto-updates]
  -o, --output-format [ascii|csv|csv-tab|double|fancy_grid|github|grid|html|jira|json|latex|latex_booktabs|mediawiki|minimal|moinmoin|orgtbl|pipe|plain|psql|psql_unicode|rst|simple|textile|tsv|vertical]
                                  Rendering mode of the output.  [default:
                                  psql_unicode]
  -s, --sort-by [manager_id|package_name|package_id|manager_name|version]
                                  Sort results.  [default: manager_id]
  --stats / --no-stats            Print per-manager package statistics.
                                  [default: stats]
  --time / --no-time              Measure and print elapsed execution time.
                                  [default: no-time]
  --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.  [default: False]
  -C, --config CONFIG_PATH        Location of the configuration file.
  -v, --verbosity LEVEL           Either CRITICAL, ERROR, WARNING, INFO or
                                  DEBUG.  [default: INFO]
  --version                       Show the version and exit.  [default: False]
  -h, --help                      Show this message and exit.  [default:
                                  False]

Commands:
  backup     Save installed packages to a TOML file.
  cleanup    Cleanup local data.
  install    Install a package.
  installed  List installed packages.
  managers   List supported package managers and their location.
  outdated   List outdated packages.
  restore    Install packages in batch as specified by TOML files.
  search     Search packages.
  sync       Sync local package info.
  upgrade    Upgrade all packages.

List all supported package managers and their status on current system (macOS):

$ mpm -a managers
┌────────────────────┬──────────┬─────────────────┬────────────────────────────┬────────────┬───────────┐
│ Package manager    │ ID       │ Supported       │ CLI                        │ Executable │ Version   │
├────────────────────┼──────────┼─────────────────┼────────────────────────────┼────────────┼───────────┤
│ Atom's apm         │ apm      │ ✓               │ ✓  /usr/local/bin/apm      │ ✓          │ ✓  2.6.2  │
│ APT                │ apt      │ ✘  Linux only   │ ✓  /usr/bin/apt            │ ✓          │ ✘         │
│ Linux Mint's apt   │ apt-mint │ ✘  Linux only   │ ✓  /usr/bin/apt            │ ✓          │ ✘         │
│ Homebrew Formulae  │ brew     │ ✓               │ ✓  /usr/local/bin/brew     │ ✓          │ ✓  3.2.13 │
│ Homebrew Cask      │ cask     │ ✓               │ ✓  /usr/local/bin/brew     │ ✓          │ ✓  3.2.13 │
│ Chocolatey         │ choco    │ ✘  Windows only │ ✘  choco not found         │            │           │
│ PHP's Composer     │ composer │ ✓               │ ✓  /usr/local/bin/composer │ ✓          │ ✓  2.1.8  │
│ Flatpak            │ flatpak  │ ✘  Linux only   │ ✘  flatpak not found       │            │           │
│ Ruby Gems          │ gem      │ ✓               │ ✓  /usr/bin/gem            │ ✓          │ ✓  3.0.3  │
│ Mac AppStore       │ mas      │ ✓               │ ✓  /usr/local/bin/mas      │ ✓          │ ✓  1.8.3  │
│ Node's npm         │ npm      │ ✓               │ ✓  /usr/local/bin/npm      │ ✓          │ ✓  7.24.0 │
│ OPKG               │ opkg     │ ✘  Linux only   │ ✘  opkg not found          │            │           │
│ Pip                │ pip      │ ✓               │ ✓  /usr/local/bin/python3  │ ✓          │ ✓  21.2.4 │
│ Snap               │ snap     │ ✘  Linux only   │ ✘  snap not found          │            │           │
│ Visual Studio Code │ vscode   │ ✓               │ ✓  /usr/local/bin/code     │ ✓          │ ✓  1.60.2 │
│ Node's yarn        │ yarn     │ ✓               │ ✘  yarn not found          │            │           │
└────────────────────┴──────────┴─────────────────┴────────────────────────────┴────────────┴───────────┘

Project details


Release history Release notifications | RSS feed

This version

4.6.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meta-package-manager-4.6.0.tar.gz (71.1 kB view hashes)

Uploaded Source

Built Distribution

meta_package_manager-4.6.0-py3-none-any.whl (109.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page