Meta Package Manager

CLI providing unifying interface to all package managers.

Stable release: Last release Python versions Software license Requirements freshness

Development: Unit-tests status Documentation Status Coverage Status Code Quality

Obligatory XKCD.

Source: XKCD #1654.

Features

  • Search and list all package managers on the system.
  • Supports macOS and Linux.
  • List installed packages.
  • Search for packages.
  • List outdated packages.
  • Sync local package infos.
  • Upgrade all outdated packages.
  • Apply commands per-package manager or to all of them.
  • Export results in JSON or user-friendly tables.
  • Provides a BitBar plugin for friendly macOS integration.

Supported package managers

Package manager Version macOS Linux Windows sync installed search install outdated upgrade
Homebrew >= 1.0.*      
Homebrew Cask >= 1.1.6      
Python 2 pip >= 9.0.0      
Python 3 pip >= 9.0.0      
Node’s npm >= 4.0.*      
Atom’s apm        
Ruby’s gem        
Mac AppStore via mas >= 1.3.1        
apt >= 1.0.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:
  -v, --verbosity LEVEL           Either CRITICAL, ERROR, WARNING, INFO or
                                  DEBUG. Defaults to INFO.
  -m, --manager [npm|mas|pip3|pip2|cask|apt|apm|brew|gem]
                                  Restrict sub-command to a subset of package
                                  managers. Repeat to select multiple
                                  managers. Defaults to all.
  -o, --output-format [simple|plain|json|fancy]
                                  Rendering mode of the output. Defaults to
                                  fancy.
  --stats / --no-stats            Print statistics or not at the end of
                                  output. Active by default.
  --stop-on-error / --continue-on-error
                                  Stop right away or continue operations on
                                  manager CLI error. Defaults to stop.
  --version                       Show the version and exit.
  --help                          Show this message and exit.

Commands:
  installed  List installed packages.
  managers   List supported package managers and their location.
  outdated   List outdated packages.
  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 managers
╒═══════════════════╤══════╤═══════════════╤════════════════════════╤══════════════╤═════════════╕
│ Package manager   │ ID   │ Supported     │ CLI                    │ Executable   │ Version     │
╞═══════════════════╪══════╪═══════════════╪════════════════════════╪══════════════╪═════════════╡
│ Atom's apm        │ apm  │ ✓             │ ✓  /usr/local/bin/apm  │ ✓            │ ✓  1.18.1   │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ APT               │ apt  │ ✘  Linux only │ ✓  /usr/bin/apt        │ ✓            │ ✘           │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Homebrew          │ brew │ ✓             │ ✓  /usr/local/bin/brew │ ✓            │ ✓  1.2.5    │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Homebrew Cask     │ cask │ ✓             │ ✓  /usr/local/bin/brew │ ✓            │ ✓  1.2.5    │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Ruby Gems         │ gem  │ ✓             │ ✓  /usr/bin/gem        │ ✓            │ ✓  2.0.14.1 │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Mac AppStore      │ mas  │ ✓             │ ✓  /usr/local/bin/mas  │ ✓            │ ✓  1.3.1    │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Node's npm        │ npm  │ ✓             │ ✓  /usr/local/bin/npm  │ ✓            │ ✓  5.3.0    │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Python 2's Pip    │ pip2 │ ✓             │ ✓  /usr/local/bin/pip2 │ ✓            │ ✓  9.0.1    │
├───────────────────┼──────┼───────────────┼────────────────────────┼──────────────┼─────────────┤
│ Python 3's Pip    │ pip3 │ ✓             │ ✓  /usr/local/bin/pip3 │ ✓            │ ✓  9.0.1    │
╘═══════════════════╧══════╧═══════════════╧════════════════════════╧══════════════╧═════════════╛

Indices and tables