TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Meta Package Manager, a CLI that solves Xkcd #1654

6 pointsby kdeldyckealmost 3 years ago
Tl;Dr: mpm implements a solution to XKCD #1654 (Universal Install Script). Now you can do:<p><pre><code> $ mpm --xkcd install &lt;my_package&gt; </code></pre> and let it figure out which package manager to use to install your package.<p>The project is open-source: https:&#x2F;&#x2F;github.com&#x2F;kdeldycke&#x2F;meta-package-manager#readme<p>This CLI has some other capabilities, like listing the duplicate packages on your system:<p><pre><code> $ mpm list --duplicates ╭────────────┬─────────┬───────────────────╮ │ Package ID │ Manager │ Installed version │ ├────────────┼─────────┼───────────────────┤ │ blah │ cargo │ 0.0.0 │ │ blah │ gem │ 0.0.2 │ │ blah │ npm │ 5.2.1 │ │ coverage │ pip │ 6.4.1 │ │ coverage │ pipx │ 6.4.1 │ │ six │ brew │ 1.16.0_2 │ │ six │ pip │ 1.16.0 │ ╰────────────┴─────────┴───────────────────╯ </code></pre> List outdated packages:<p><pre><code> $ mpm outdated ╭───────────┬─────────┬───────────────────┬────────────────╮ │ ID │ Manager │ Installed version │ Latest version │ ├───────────┼─────────┼───────────────────┼────────────────┤ │ curl │ brew │ 7.79.1 │ 7.79.1_1 │ │ git │ brew │ 2.33.0 │ 2.33.0_1 │ │ npm@8.0.0 │ npm │ 7.24.0 │ 8.0.0 │ │ pip │ pip │ 21.2.4 │ 21.3 │ │ regex │ pip │ 2021.9.30 │ 2021.10.8 │ ╰───────────┴─────────┴───────────────────┴────────────────╯ </code></pre> Or dump all installed packages to a file:<p><pre><code> $ mpm snapshot packages.toml Dumping packages from brew... Dumping packages from cask... Dumping packages from gem... Dumping packages from mas... Dumping packages from npm... Dumping packages from pip... 1109 packages total (npm: 659, brew: 229, pip: 115, gem: 49, cask: 48, mas: 9). </code></pre> To install it, either use:<p><pre><code> $ pipx install meta-package-manager $ pip install meta-package-manager $ python -m pip install meta-package-manager $ brew untap hasnep&#x2F;tap &amp;&amp; brew install hasnep&#x2F;tap&#x2F;meta-package-manager $ paru -S meta-package-manager $ yay -S meta-package-manager </code></pre> Or if you are meta:<p><pre><code> $ mpm install meta-package-manager </code></pre> See install doc at: https:&#x2F;&#x2F;kdeldycke.github.io&#x2F;meta-package-manager&#x2F;install.html

1 comment

kdeldyckealmost 3 years ago
I started working on this 6 years ago in the form of a hackish script to have all outdated packages listed in my macOS task bar. You can replicate this with an xBar&#x2F;SwiftBar plugin: <a href="https:&#x2F;&#x2F;kdeldycke.github.io&#x2F;meta-package-manager&#x2F;bar-plugin.html" rel="nofollow">https:&#x2F;&#x2F;kdeldycke.github.io&#x2F;meta-package-manager&#x2F;bar-plugin....</a><p>Now the CLI supports Linux, macOS and Windows. And implements list, outdated, search, install, upgrade, remove, sync and cleanup operations.<p>Supported package managers are: apm, apt, apt-mint, brew, cargo, cask, chocolatey, composer, dnf, emerge, flatpak, gem, mas, npm, opkg, pacman, paru, pip, pipx, snap, steamcmd, vscode, yarn, yay, yum and zypper.<p>Some other use-cases are documented here: <a href="https:&#x2F;&#x2F;kdeldycke.github.io&#x2F;meta-package-manager&#x2F;usecase.html" rel="nofollow">https:&#x2F;&#x2F;kdeldycke.github.io&#x2F;meta-package-manager&#x2F;usecase.htm...</a><p>The worst thing with this project is trying to run some sorts of integration tests over the whole matrix of OS&#x2F;distribution&#x2F;package managaer&#x2F;versions. That&#x27;s time consuming, tedious and implies lots of trials and errors. So I am just aiming at doing a good-enough work on that front.<p>It&#x27;s not perfect but the CLI is useable everyday judging by feedback I gathered so far. Now I need ever more feedback and help to manage all that menagerie! :)<p>Note: this Show HN was suggested some month ago by other users at <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30290079" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30290079</a>