@mulham28/pkgmap
v1.11.1
Published
One command to see everything installed on your machine
Maintainers
Readme
pkgmap
One command to see everything installed on your machine, across all your package managers.
╔═══════════════════════════════════╗
║ 📦 pkgmap ║
╚═══════════════════════════════════╝What is pkgmap?
pkgmap scans package managers installed on your machine and displays everything in one clean terminal table, including manager, version, and package type.
No more jumping between npm list -g, brew list, pip list, flatpak list, or distro-specific package commands. One command, one inventory view.
Need a quick port check too? pkgmap ports extends the same CLI to show active listening ports without leaving the pkgmap flow.
Supported Package Managers
| Icon | Manager | Command Used | macOS | Linux | Windows |
|------|---------|-------------|:-----:|:-----:|:-------:|
| 📦 | npm | npm list -g --depth=0 --json | ✅ | ✅ | ✅ |
| 📦 | pnpm | pnpm list -g --depth=0 --json | ✅ | ✅ | ✅ |
| 🧶 | yarn | yarn global list --depth=0 | ✅ | ✅ | ✅ |
| 🍺 | brew | brew info --json=v2 --installed | ✅ | ✅ | ❌ |
| ⚡ | volta | volta list --format=plain | ✅ | ✅ | ✅ |
| 🐍 | pip | pip3 list --format=json | ✅ | ✅ | ✅ |
| 🦀 | cargo | cargo install --list | ✅ | ✅ | ✅ |
| 💎 | gem | gem list | ✅ | ✅ | ❌ |
| 🎼 | composer | composer global show --format=json | ✅ | ✅ | ✅ |
| 🐘 | gradle | scan ~/.gradle/caches/modules-2/files-2.1 | ✅ | ✅ | ✅ |
| ☕ | maven | scan ~/.m2/repository | ✅ | ✅ | ✅ |
| 🔷 | nuget | scan global packages via dotnet nuget locals global-packages --list | ✅ | ✅ | ✅ |
| 🐧 | apt | dpkg-query -W -f="${Package}\t${Version}\n" | ❌ | ✅ | ❌ |
| 🏹 | pacman | pacman -Q | ❌ | ✅ | ❌ |
| 🎩 | dnf | dnf repoquery --installed --qf "%{name}\t%{version}-%{release}" | ❌ | ✅ | ❌ |
| 🧊 | flatpak | flatpak list --app --columns=application,version | ✅ | ✅ | ❌ |
| 📦 | snap | snap list | ❌ | ✅ | ❌ |
| 🛠 | yum | yum list installed -q | ❌ | ✅ | ❌ |
| 🪽 | winget | winget list --accept-source-agreements | ❌ | ❌ | ✅ |
| 🍫 | choco | choco list --local-only --limit-output | ❌ | ❌ | ✅ |
| 🥤 | scoop | scoop export | ❌ | ❌ | ✅ |
| ❄️ | nix | nix-env -q --installed --json | ✅ | ✅ | ✅ |
| 🧪 | uv | uv tool list | ✅ | ✅ | ✅ |
| 🥟 | bun | bun pm ls --global --json | ✅ | ✅ | ✅ |
| 📦 | pipx | pipx list --json | ✅ | ✅ | ✅ |
| 🪶 | poetry | poetry self show plugins --no-ansi | ✅ | ✅ | ✅ |
| ⎈ | helm | helm plugin list | ✅ | ✅ | ✅ |
| 🔌 | krew | kubectl krew list | ✅ | ✅ | ✅ |
| 🏔 | apk | apk info -v | ❌ | ✅ | ❌ |
| 🦎 | zypper | zypper search --installed-only --details --type package | ❌ | ✅ | ❌ |
| 🐡 | pkg | pkg info | ❌ | ❌ | ✅ |
| 🐹 | go | go env GOPATH + scan $GOPATH/bin | ✅ | ✅ | ✅ |
| 🐍 | conda / mamba | conda list --json / mamba list --json | ✅ | ✅ | ✅ |
| 🛠 | mise | mise ls --json | ✅ | ✅ | ❌ |
| 🔧 | asdf | asdf list | ✅ | ✅ | ❌ |
| 🚢 | macports | port installed | ✅ | ❌ | ❌ |
| 🐫 | opam | opam list --installed --columns=name,version --color=never | ✅ | ✅ | ✅ |
| 🧱 | vcpkg | vcpkg list | ✅ | ✅ | ✅ |
Only managers that are installed and return packages will appear in the output.
Output
pkgmap
╔═══════════════════════════════════╗
║ 📦 pkgmap ║
╚═══════════════════════════════════╝
📦 npm: 4 · 🍺 brew: 64 · 🐍 pip: 3 · 🐧 apt: 1812 · 🏹 pacman: 512
Total: 2395 packages across 5 manager(s)
┌──────────┬────────────────────────────┬──────────────┬──────────┐
│ Manager │ Package │ Version │ Type │
├──────────┼────────────────────────────┼──────────────┼──────────┤
│ 📦 npm │ typescript │ 5.4.2 │ cli │
├──────────┼────────────────────────────┼──────────────┼──────────┤
│ 🍺 brew │ git │ 2.44.0 │ formula │
├──────────┼────────────────────────────┼──────────────┼──────────┤
│ 🐧 apt │ curl │ 8.5.0 │ system │
└──────────┴────────────────────────────┴──────────────┴──────────┘pkgmap audit
╔═══════════════════════════════════╗
║ 📦 pkgmap ║
╚═══════════════════════════════════╝
✅ ok: 6 · 🟣 advisory: 1
Total: 7 package audit check(s) across 2 manager(s)
┌──────────────────┬──────────────────────────────────────┬────────────────────────┐
│ Package Manager │ Package │ Status │
├──────────────────┼──────────────────────────────────────┼────────────────────────┤
│ 🦀 cargo │ cargo-audit │ ok │
├──────────────────┼──────────────────────────────────────┼────────────────────────┤
│ 📦 npm │ @google/gemini-cli │ advisory:1 │
├──────────────────┼──────────────────────────────────────┼────────────────────────┤
│ 📦 npm │ @openai/codex │ ok │
└──────────────────┴──────────────────────────────────────┴────────────────────────┘
Warnings: 1
- brew: audit not supported yet, skipped.pkgmap ports
╔═══════════════════════════════════╗
║ 📦 pkgmap ║
╚═══════════════════════════════════╝
2 active listening port(s)
┌────────┬──────────┬──────────────────────┬──────────┬────────────────────────────┬────────────┐
│ Port │ Protocol │ Process │ PID │ Address │ State │
├────────┼──────────┼──────────────────────┼──────────┼────────────────────────────┼────────────┤
│ :3000 │ tcp │ node │ 48211 │ 127.0.0.1 │ LISTEN │
├────────┼──────────┼──────────────────────┼──────────┼────────────────────────────┼────────────┤
│ :5432 │ tcp │ postgres │ 1902 │ 0.0.0.0 │ LISTEN │
└────────┴──────────┴──────────────────────┴──────────┴────────────────────────────┴────────────┘Prerequisites
- Node.js >= 20 for the supported runtime baseline
- npm bundled with Node.js
If Node.js is not installed yet, get it from nodejs.org or use a version manager like nvm.
Install
One-liner
curl -fsSL https://raw.githubusercontent.com/mulhamna/pkgmap/main/install.sh | shAuto-detects your OS and picks the best installer.
Via Homebrew (macOS / Linux)
brew tap mulhamna/tap
brew install pkgmapVia npm / pnpm / yarn / volta / bun
npm install -g @mulham28/pkgmap
pnpm add -g @mulham28/pkgmap
yarn global add @mulham28/pkgmap
volta install @mulham28/pkgmap
bun add -g @mulham28/pkgmapManual install
git clone https://github.com/mulhamna/pkgmap.git
cd pkgmap
npm install
npm link
pkgmapTip for macOS/Linux: if
npm linkfails with a permission error, usenvmor fix your npm global prefix instead of relying on sudo.Tip for Windows: run PowerShell or CMD as Administrator before
npm link.
Usage
# Scan all package managers
pkgmap
# Scan only one manager
pkgmap --manager brew
pkgmap --manager apt
# Search for a specific package across all managers
pkgmap --search node
pkgmap --search git
# Show only duplicate packages installed via multiple managers
pkgmap --duplicates
# Export results to JSON file
pkgmap --export
# creates pkgmap-export.json
# Print JSON directly to terminal
pkgmap --json
# Check audit status for installed npm packages
pkgmap audit --manager npm
# Check one package only
pkgmap audit --manager cargo --package ripgrep
# Show active listening ports
pkgmap ports
# Show only suspicious listeners (orphan / zombie)
pkgmap ports --check
# Gracefully stop whatever owns a port
pkgmap ports --kill 3000
# Force-kill a stuck listener
pkgmap ports --kill 3000 --force
# Show active listening ports as JSON
pkgmap ports --json
# Upgrade packages across every supported installed manager
pkgmap upgrade
# Upgrade only one manager
pkgmap upgrade --manager npm
# Preview the upgrade commands without running them
pkgmap upgrade --dry-runFlags
| Flag | Shorthand | Description |
|------|-----------|-------------|
| --manager <name> | -m | Scan only a specific package manager |
| --search <package> | -s | Search for a package by name |
| --duplicates | -d | Show only packages installed via multiple managers |
| --export | -e | Export results to pkgmap-export.json |
| --json | -j | Print results as JSON to stdout |
| --version | -V | Show version |
| --help | -h | Show help |
Audit subcommand
| Command | Description |
|---------|-------------|
| pkgmap audit --manager npm | Check installed packages from one manager against OSV advisories |
| pkgmap audit --manager cargo --package ripgrep | Check only matching package names |
| pkgmap audit --json | Print audit results as JSON |
Ports subcommand
| Command | Description |
|---------|-------------|
| pkgmap ports | Show active listening TCP ports |
| pkgmap ports --check | Show only orphan or zombie listening TCP ports |
| pkgmap ports --kill <port-or-pid> | Send SIGTERM to the process behind a listening port or PID |
| pkgmap ports --kill <port-or-pid> --force | Send SIGKILL instead of SIGTERM |
| pkgmap ports --json | Print active listening TCP ports as JSON |
Upgrade subcommand
| Command | Description |
|---------|-------------|
| pkgmap upgrade | Upgrade packages across every supported installed package manager |
| pkgmap upgrade --manager npm | Upgrade packages only for one manager |
| pkgmap upgrade --dry-run | Print the commands that would run without executing them |
Notes:
pkgmap upgradeskips managers that are not accommodated yet.- Currently skipped / not yet accommodated:
gradle,maven,nuget,helm,go, andvolta.- Some managers may prompt for
sudo/ admin privileges during upgrade.
Edge Cases Handled
- Manager not installed, silently skipped
- Manager installed but no packages, also skipped
- Permission issues, warning shown and scan continues
- Slow scanners, timeout and skip with a warning
- Duplicate packages across managers, highlighted with cross-manager hints
- Package audit status checks via
pkgmap auditwith per-package status output - Active listening TCP ports via
pkgmap ports - Orphan / zombie listener checks via
pkgmap ports --check - Graceful or forced listener termination via
pkgmap ports --kill <port-or-pid> - Bulk package upgrades via
pkgmap upgradefor supported managers, with unsupported managers skipped cleanly - Windows compatibility, unsupported managers auto-skipped and longer npm timeout applied
- Arch Linux, Fedora/RHEL, Alpine, openSUSE, FreeBSD, Windows, Nix, Python tooling, Bun, OCaml, MacPorts, vcpkg, and Kubernetes plugin ecosystems are now covered
Adding a New Scanner
- Create
src/scanners/<name>.js - Return this shape:
export default async function scan() {
return {
manager: 'mymanager',
packages: [
{ name: 'some-package', version: '1.1.1', type: 'library' }
]
}
}- Register it in
src/index.js - Add an icon in
src/display/table.js
Tech Stack
- Runtime: Node.js (ESM)
commanderfor CLI flagschalkfor terminal colorscli-table3for table renderingorafor the scanning spinner
License
MIT, see LICENSE.
