conda-repoquery
Query Conda package repository information
TLDR
Show available versions of the specified package
Show dependencies of the specified package
Show packages that depend on the specified package
SYNOPSIS
conda-repoquery [command] [options] [package_spec]
Common Commands:
search [options] package_spec
depends [options] package_spec
whoneeds [options] package_spec
history [options] package_spec
PARAMETERS
-h, --help
Show the program's help message and exit.
-c CHANNEL, --channel CHANNEL
Specify a Conda channel to search. Can be used multiple times.
--platform PLATFORM, --subdir PLATFORM
Filter packages by target platform (e.g., linux-64, win-64, osx-64).
--json
Output results in JSON format, suitable for programmatic parsing.
--pretty
Pretty-print JSON output for better readability when using --json.
--show-all
For search, show all available versions and build strings of a package.
--recursive
For depends or whoneeds, recursively list all dependencies or reverse dependencies.
--build-string STRING
Filter results by a specific build string pattern.
--version
Show program's version number and exit.
DESCRIPTION
conda-repoquery is a powerful command-line utility for inspecting and querying metadata from remote Conda package repositories directly. Unlike conda search, which might rely on a local cache or a more complex environment setup, conda-repoquery is designed for lightweight, direct interaction with repository APIs (like repodata.json).
It enables users to quickly find packages, list their dependencies, discover which packages depend on a given package, and even view package history across specified channels and platforms. This tool is invaluable for scripting, continuous integration/continuous deployment (CI/CD) pipelines, or when debugging package resolution issues, as it provides a clear, un-cached view of what's available in the Conda ecosystem without requiring a full local Conda environment or installing any packages.
CAVEATS
conda-repoquery queries remote repositories directly and does not utilize a local Conda environment's package cache. Therefore, its results might differ from conda search if your local Conda configuration includes private channels or specific channel priorities that are not explicitly provided via --channel. It also does not perform full dependency resolution like conda install, focusing solely on package metadata lookup. Performance can be affected by network latency and the size of the queried repositories.
COMMON USE CASES
- Scripting package availability checks in CI/CD pipelines.
- Quickly inspecting dependencies or reverse dependencies of a package on a specific channel.
- Debugging issues related to packages being present or absent from remote repositories.
- Programmatically fetching package metadata for custom tools or dashboards.
KEY SUBCOMMANDS
search: Finds packages matching a specified name or pattern across available channels.
depends: Lists the direct and, optionally, recursive dependencies of a given package.
whoneeds: Identifies packages that directly or recursively depend on the specified package.
history: Shows historical changes and versions available for a particular package in the repository.
HISTORY
conda-repoquery emerged as a specialized tool within the Conda ecosystem to address the need for more granular and direct repository introspection. While conda search provides similar functionality, conda-repoquery was developed to offer a lightweight, API-driven approach to querying remote repodata.json files, making it ideal for automation and scenarios where a full Conda environment initialization is undesirable or unnecessary. Its development reflects the growing demand for programmatic access and efficient metadata retrieval from Conda channels, distinguishing it with a focus on raw repository data over complex solver interactions.


