✨ feat(render): add Rich library support for enhanced tree output#551
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Mar 10, 2026
Merged
✨ feat(render): add Rich library support for enhanced tree output#551gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
f77bb93 to
8ccab85
Compare
This adds a new --output rich format that uses the Rich library for enhanced terminal output with color coding and visual indicators. The implementation follows the same pattern as graphviz (optional dependency, opt-in via pip install pipdeptree[rich]). It provides color-coded package names, versions, and metadata, along with status icons (✓/⚠/✗) for dependency states and version highlighting based on whether requirements are satisfied. Added rich to text output formats so warnings display correctly. Updated CLI help strings to reflect rich format support for --all, --depth, and --license options.
Collaborator
|
Was messing around with it, looks sweet!! |
Member
Author
|
#552 I merged it to resolve the conflict with this more heavy-hitting PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds Rich library integration as an optional extra, following the same pattern as the existing graphviz support. The new --output rich format provides color-coded components (package names in cyan, versions in green, metadata in yellow), status icons (✓/⚠/✗) for dependency states, and enhanced tree guides. Version highlighting uses red for missing packages, yellow for conflicts, and green for satisfied dependencies.
The implementation remains opt-in via pip install pipdeptree[rich] to avoid bloating the base package. It reuses the existing tree traversal logic and delegates visual formatting to Rich's Tree component.
Closes #380