SkillAgentSearch skills...

Qp

qp - Query Packages. Query installed packages across ecosystems on Linux and macOS.

Install / Use

/learn @Zweih/Qp

README

qp - query packages

qp is a command-line program for Linux and macOS to query installed packages across ecosystems.

qp queries over 6x faster than native package searching while returning more comprehensive metadata than native package search solutions.

Query packages from apk, brew, pacman, apt, flatpak, snap, npm, pipx, dnf, pkgtool, and opkg. Ecosystems are added frequently!

qp supports querying with full boolean logic for package metadata, dependency relations, and more.

You can find installation instructions here.

Check features to find out more.

Check usage for all available commands + options.

downloads-badge clones-badge

<img src="https://zweih.github.io/repulse-analytics/qp-logo-query-packages.svg" alt="qp logo - query packages CLI tool logo">

AUR version - qp AUR version - qp-bin AUR version - qp-git

Alt

<details open> <summary><strong>Download and clone statistics</strong></summary> <br>

Graphs are generated daily with my other project, Repulse Analytics

repulse graphs for qp

</details>

This package is compatible with the following platforms and distributions:

qp also detects and queries other system level package managers like flatpak, snap, npm, and pipx for globally installed applications, expanding package discovery beyond traditional system package management.

qp supports embedded linux systems, including meta-distributions like yocto that use opkg (.ipk packages) or apt/dpkg (.deb packages) or .rpm packages.

Features

  • List installed packages across supported systems
  • Compatible with MacOS, Arch, Debian, OpenWrt, and over 60 distros
    • Supports multiple ecosystems:
      • System package managers:
        • apk, pacman, brew, apt/dpkg, dnf/yum, pkgtool, and opkg
      • Application package managers:
        • flatpak, snap, npm, and pipx
  • Query packages using an expressive query language
    • Full boolean logic (and, or, not, grouping)
    • Fuzzy and strict matching
    • Range queries for size, updated, freeable, footprint, etc.
    • Existence checks (has:, no:)
    • Learn more about querying here
    • Complex queries via grouping (q ... p) and built-in macros
      • Includes orphan and superorphan filters
  • Sort results by any field
  • Output formats:
    • Table (default)
    • Key/value
    • JSON
  • Query by:
    • Name, version, origin, architecture, license
    • Cross-origin package detection (also-in field shows where packages exist across different package managers)
    • Size on disk, freeable storage, and total footprint
    • Update or build time/date
    • Package base or groups
    • Dependencies, optional dependencies, reverse dependencies
    • Package provisions, conflicts, replacements
    • Installation reason (explicit or dependency)
    • Package validation method (e.g., sha256, pgp)
    • Packager, URL, description
    • Package type (debug, split, cask, formula, etc.)
  • Customizable field selection for output
  • Cache system for fast repeated queries
  • Lightweight, fast, concurrent architecture
  • CLI designed for both scripting and interactive use
  • Extensive roadmap with frequent improvements and optimizations

Learn about usage here.

Learn about installation here.

Is it good?

Yes.

Roadmap

<details> <summary><strong>Phase 1</strong></summary>

| Status | Feature | Status | Feature | |--------|---------|--------|---------| | ✓ | remove expac as a dependency (300% speed boost) | ✓ | concurrent file reading (200% speed boost) | | ✓ | protobuf caching (127% speed boost) | ✓ | use chunked channel-based concurrent querying (12% speed boost) | | ✓ | optimize file reading (28% speed boost) | ✓ | improve sorting efficiency (8% speed boost) | | ✓ | optimize query order (4% speed boost) | ✓ | concurrent querying | | ✓ | concurrent sorting | ✓ | asynchronous progress bar | | ✓ | channel-based aggregation | ✓ | rewrite in golang | | ✓ | automate binaries packaging | ✓ | CI to release binaries | | ✓ | dependency depth resolution | ✓ | config dependency injection for testing | | ✓ | query by package name | ✓ | query by size on disk | | ✓ | query by range of size on disk | ✓ | query by date range | | ✓ | user defined field selection | ✓ | dependencies of each package (dependency field) | | ✓ | reverse-dependencies of each package (required-by field) | ✓ | list of packages for package queries | | ✓ | package provisions | ✓ | package description query | | ✓ | package conflicts field | ✓ | package architecture field | | ✓ | package URL field | ✓ | package version field | | ✓ | package license field | ✓ | package base field | | ✓ | package base sort | ✓ | license query | | ✓ | license sort | ✓ | dependency graph | | ✓ | metaflag for all queries | ✓ | JSON output | | ✓ | no-headers option | ✓ | provides query | | ✓ | depends query | ✓ | all-fields option | | ✓ | required-by query | ✓ | no cache option | | ✓ | optional full timestamp | ✓ | package description field | | ✓ | groups query | ✓ | driver interface | | ✓ | package base query | ✓ | required-by sort | | ✓ | optdepends sort | ✓ | depends sort | | ✓ | build-date field | ✓ | build-date query | | ✓ | build-date sort | ✓ | pkgtype field | | ✓ | url query | ✓ | pkgtype sort | | ✓ | architecture query | ✓ | groups field | | ✓ | conflicts query | ✓ | package description sort | | ✓ | regenerate cache option | ✓ | validation query | | ✓ | url sort | ✓ | groups sort | | ✓ | packager field | ✓ | optional dependency field | | ✓ | sort by size on disk | ✓ | conflicts sort | | ✓ | optional-for sort | ✓ | provides sort | | ✓ | validation field | ✓ | validation sort | | ✓ | packager sort | ✓ | architecture sort | | ✓ | reason sort | ✓ | version sort | | ✓ | pkgtype query | ✓ | optdepends query | | ✓ | origin sort | ✓ | origin query | | ✓ | packager query | ✓ | origin field | | ✓ | replaces sort | ✓ | optional-for query |

</details>

<strong>Phase 2</strong>

| Status | Feature | Status | Feature | |--------|---------|--------|---------| | ✓ | reverse optional dependencies field (optional-for) | - | optdepends installation indicator | | - | separate field for optdepends reason | ✓ | fuzzy/strict querying | | ✓ | existence querying | ✓ | depth querying | | ✓ | command-based syntax | ✓ | full boolean logic | | ✓ | abstract syntax tree | ✓ | directed acyclical graph for filtering | | - | user-defined macros | ✓ | parentetical (grouping) logic | | ✓ | limit from end | ✓ | limit from middle | | ✓ | built-in macros | ✓ | streaming pipeline | | - | query explaination | - | user configuration file | | ✓ | deb origin (apt/dpkg support) | ✓ | deb packaging | | ✓ | opkg origin (openwrt support) | ✓ | brew origin (homebrew support)| | ✓ | bottles in brew | ✓ | casks in brew | | - | replaced-by resolution | - | multi-license support | | – | short-args for queries | ✓ | key/value output | | ✓ | rpm origin (dnf/yum support) | ✓ | homebrew packaging | | ✓ | pipx origin (python global packages) | ✓ | formulae from taps (brew) | | - | casks from taps (brew) | - | dependencies for casks | | - | rpm packaging | - | zypper (openSUSE support) | | ✓ | cache-only option | ✓ | pacman hook | | - | brew hook | - | deb hook | | ✓ | npm origin (npm global packages) | - | nested dependencies | | ✓ | also-in field (cross-origin managed) | ✓ | env field | | ✓ | other envs field | - | support for multiple virtual environments (nvm/pyenv/etc.) | | ✓ | freeable field | ✓ | footprint field | | ✓ | flatpak origin | - | install history | | ✓ | snap origin | ✓ | title field | | - | keywords/tags field | - | notes/comment field | | - | author field | - | cargo origin | | - | log levels | ✓ | chunked cache (70% speed boost) | | ✓ | apk origin (alpine linux support) | ✓ | optimize creation-time validation | | - | package for apk (alpine) | - | log file |
| ✓ | pkgtool origin (slackware support) | ✓ | multi-line queries |

Installation

Homebrew (macOS or

View on GitHub
GitHub Stars21
CategoryDevelopment
Updated7d ago
Forks1

Languages

Go

Security Score

95/100

Audited on Mar 29, 2026

No findings