| Requirement | Minimum | Notes |
|---|---|---|
| Python | 3.6+ | Tested on 3.6 – 3.14 |
| Nerd Font | Any Nerd Font v3 | Required for icons to render correctly |
| OS | Any | Windows, macOS, Linux |
Tip: If you skip installing a Nerd Font, the tree still works but icons will appear as squares or question marks. Run
rtree --onboardto get guided setup help.
pip install rich-tree
pip install git+https://github.com/wasi-master/rich-tree
pipx install rich-tree
Or run it without installing at all:
pipx run rich-tree .
Once installed, you can immediately run:
rtree
This displays the tree for the current directory.
To display a specific directory:
rtree /path/to/directory
Or using python -m:
python -m rtree /path/to/directory
rich-tree uses Nerd Fonts for its beautiful icon set. You need to:
Run the onboarding wizard to check if your icons are rendering correctly:
rtree --onboard
If icons show as boxes or ?, follow the instructions in the Onboarding Wizard guide.
tree to rtreeYou can alias the classic tree command to rtree so existing habits and scripts keep working.
Add this line to ~/.bashrc or ~/.zshrc:
alias tree="rtree"
Then reload your shell:
source ~/.bashrc # or ~/.zshrc
alias tree="rtree"
funcsave tree
Add to your PowerShell profile:
New-Alias tree rtree
Create a file tree.bat in C:\Windows\System32 with content:
@echo off
call rtree %*
Tip: The interactive onboarding wizard (
rtree --onboard) provides shell-specific alias instructions automatically.
rich-tree depends on these Python packages (installed automatically):
| Package | Purpose |
|---|---|
rich |
Beautifully formatted terminal output, tree widget |
click |
CLI argument/option parsing |
rich-click |
Rich-formatted --help output |
questionary |
Interactive prompts in the onboarding wizard |
shellingham |
Detects the active shell for alias instructions |
rtree --onboard for a guided interactive setup.