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

** mpm is the yt-dlp of package managers. **

As the latter, mpm is a multi-platform CLI (Linux, macOS, Windows) that is providing a unifying interface. But to all package managers it supports.

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

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.5.0.tar.gz (69.6 kB view details)

Uploaded Source

Built Distribution

meta_package_manager-4.5.0-py3-none-any.whl (107.7 kB view details)

Uploaded Python 3

File details

Details for the file meta-package-manager-4.5.0.tar.gz.

File metadata

  • Download URL: meta-package-manager-4.5.0.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for meta-package-manager-4.5.0.tar.gz
Algorithm Hash digest
SHA256 bf6bcc0452c23d83437403ca6edbd39f3b09d54d8f8de24beb75c0f499503fa0
MD5 b7c39472e35d66ba9a0ac069a0f206bc
BLAKE2b-256 0d95e21406347ba21d208a5673731da6b5e678a6273044fffdcbd3c1deea681a

See more details on using hashes here.

File details

Details for the file meta_package_manager-4.5.0-py3-none-any.whl.

File metadata

  • Download URL: meta_package_manager-4.5.0-py3-none-any.whl
  • Upload date:
  • Size: 107.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for meta_package_manager-4.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25274925052d10cd9095864500fbd19ec2c749b07904db22fc3d8d00366bff03
MD5 0ef24e7aaa26583de1c937ceb1f6c0c0
BLAKE2b-256 34d2058f338513a3dbd7cdd7fb26a97f9f0ce8b199832771c6320bb0f20affc9

See more details on using hashes here.

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