feat: add --fields argument to pixi list#5105
Conversation
This adds a new `--fields` argument to the `pixi list` command that allows users to: - Select which columns to display in the output - Control the order in which columns appear Available fields include: name, version, build, build-number, size, kind, source, license, license-family, is-explicit, is-editable, description, md5, sha256, arch, platform, subdir, timestamp, noarch, file-name, and url. The default fields match the current behavior: name, version, build, size, kind, source. Example usage: pixi list --fields name,version,license pixi list --fields name,version,sha256 Closes prefix-dev#5102
- Remove Serialize derive and serde attribute since Field is never serialized - Remove redundant doc comment listing available fields (clap shows them in help) - Regenerate CLI documentation
|
Also, whilst mucking about in here: some care to alignment would be helpful: pretty much anything in an ordinal domain would benefit from being right-aligned. vs: This still leaves size somewhat difficult to visually inspect: i believe Another example of data loss is the (useful) direct/transitive dependency status, with a direct dependency encoded as a bold, green package name. Perhaps a |
Switch from tabwriter to comfy-table for table formatting in pixi list: - Right-align the Size column for better readability - Keep styling for explicit dependencies (bold colored names) - Keep fancy display for package kind - Simpler API without manual tab-delimited formatting
|
The Requested is great, and shows actual information: could get long for some matchspecs out there in the wild, but probably more useful than some tree-walking metric which i've frankly never seen anywhere else, certainly not worth the hustle to dig that up if it's not just lying around. Again regarding space/noise: I'm not sure how much value the second decimal place provides, but hardly seems worth doing anything about, and certainly would be relevant for the |
nichmor
left a comment
There was a problem hiding this comment.
Loooks good technically and semantically!



Description
Adds the
--fieldsargument to pixi list and exposes just about everything possible.Fixes #5102
Fixes #4715
Fixes #2076
Fixes #1558
How Has This Been Tested?
AI Disclosure
Tools: Claude Opus 4.5
Checklist:
schema/model.py.