This project provides a command-line tool to inspect conda packages and extract metadata from their index.json file.
It is designed to work well with Pixi and CI/CD workflows.
pixi-inspect analyzes a conda package (either from disk or stdin) and extracts metadata from its index.json.
It uses the rattler_package_streaming crate for robust extraction and parsing.
You can install pixi-inspect from conda-forge using pixi:
pixi global install pixi-inspect- Rust 1.70+ and Cargo
- Pixi (optional, for conda workflows)
git clone https://gitlab.in2p3.fr/thibaut.oprinsen/pixi-inspect
cd pixi-inspect
cargo build --releaseThe binary will be available at target/release/pixi-inspect.
To use globally:
cp target/release/pixi-inspect ~/.local/bin/Make sure ~/.local/bin/ is in your PATH.
pixi-inspect get-info /path/to/package.condacat package.conda | pixi-inspect get-info -find /path/to/workspace -path '/path/to/workspace/.pixi' -prune -o -name '*.conda' -exec pixi-inspect get-info {} \;find . -path './.pixi' -prune -o -name '*.conda' -exec pixi-inspect get-info {} \;pixi-inspect --help- ✅ Extracts metadata from
.condaand.tar.bz2packages - ✅ Reads from file or stdin
- ✅ Displays pretty-printed JSON
- ✅ Robust error handling
A typical index.json looks like:
{
"name": "package-name",
"version": "1.0.0",
"build": "py39h123456_0",
"build_number": 0,
"depends": ["python >=3.9", "numpy"],
"platform": "linux-64",
"license": "MIT",
"timestamp": 1634567890,
"size": 1234567
}src/
└── main.rs # CLI entry point, extraction and parsing logic
Extraction and parsing are now handled directly in
main.rsusing rattler_package_streaming.
PACKAGE_VERSION=$(pixi-inspect get-info /path/to/package.conda | jq -r '.version')
echo "Package version: $PACKAGE_VERSION"pixi-inspect get-info /path/to/package.conda | jq -r '.depends[]'