paq
A unified CLI for querying installed packages across multiple package managers.
繁體中文
Why?
Developers typically have multiple package managers installed, each with different commands:
brew list # Homebrew
npm list -g # npm
snap list # Snap
flatpak list # Flatpak
paq gives you one consistent interface:
paq brew
paq npm
paq snap
paq flatpak
Features
- Single binary — cross-platform (macOS, Linux, Windows)
- Zero config — auto-detects available package managers
- Two output formats — table (default) and JSON (
--json)
- Extensible — add new providers without modifying core code
- Self-updating —
paq upgrade auto-detects install method and updates
Install
Homebrew
brew install cluion/tap/paq
Go install
go install github.com/cluion/paq/cmd/paq@latest
From source
git clone https://github.com/cluion/paq.git
cd paq
make build
sudo make install # installs to /usr/local/bin/paq
If you prefer not to use sudo, add an alias to your shell config (~/.zshrc or ~/.bashrc):
alias paq="/path/to/paq/bin/paq"
Download binary
Download the latest release from Releases.
Update
Run paq upgrade to auto-detect your install method and upgrade:
paq upgrade # auto-detect and upgrade
paq upgrade --check # check for new version only
Works for all install methods: Homebrew, go install, and direct binary downloads.
Or manually:
Go:
go install github.com/cluion/paq/cmd/paq@latest
Homebrew:
brew upgrade cluion/tap/paq
From source:
cd paq
git pull
make build
sudo make install # if alias, just rebuild — it takes effect immediately
Uninstall
Homebrew:
brew uninstall cluion/tap/paq
Go install:
rm $(go env GOPATH)/bin/paq
From source:
sudo make uninstall
# or manually:
sudo rm /usr/local/bin/paq
Releasing
Maintainers can trigger a release by pushing a tag. GitHub Actions will automatically build, create a Release, and update the Homebrew formula:
git tag v1.0.0
git push origin v1.0.0
Prerequisite: create the cluion/homebrew-tap repository on GitHub first.
Usage
List detected package sources
paq list
Source Display Name Status
brew Homebrew available
npm npm available
snap Snap not found
flatpak Flatpak not found
Total: 4
Query a specific source
paq brew
Name Version Description
git 2.40.0 Distributed version control system
node 20.1.0 Platform built on V8
curl 8.1.0
Total: 3
JSON output
paq brew --json
{
"source": "brew",
"count": 3,
"packages": [
{ "name": "git", "version": "2.40.0", "desc": "Distributed version control system" },
{ "name": "node", "version": "20.1.0", "desc": "Platform built on V8" },
{ "name": "curl", "version": "8.1.0" }
]
}
Version
paq version
paq dev (commit: abc1234, built: 2026-04-06)
Supported Package Managers
| Provider |
Command |
Platforms |
| Homebrew |
paq brew |
macOS |
| npm |
paq npm |
macOS, Linux, Windows |
| Snap |
paq snap |
Linux |
| Flatpak |
paq flatpak |
Linux |
| APT/dpkg |
paq apt |
Linux (Debian/Ubuntu) |
Development
Prerequisites
Build
make build
Test
make test
Lint
make lint
License
MIT