rich-tree

Getting Started

Requirements

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 --onboard to get guided setup help.


Installation

pip install rich-tree

From GitHub (latest development version)

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 .

First Run

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

Nerd Font Setup

rich-tree uses Nerd Fonts for its beautiful icon set. You need to:

  1. Download a Nerd Font from nerdfonts.com/font-downloads
    (Recommended: JetBrainsMono Nerd Font, CaskaydiaCove, or FiraCode Nerd Font)
  2. Install the font on your system.
  3. Set your terminal’s font to the installed Nerd Font.

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.


Aliasing tree to rtree

You can alias the classic tree command to rtree so existing habits and scripts keep working.

Bash / Zsh

Add this line to ~/.bashrc or ~/.zshrc:

alias tree="rtree"

Then reload your shell:

source ~/.bashrc   # or ~/.zshrc

Fish

alias tree="rtree"
funcsave tree

PowerShell

Add to your PowerShell profile:

New-Alias tree rtree

Windows CMD

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.


Dependencies

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

Next Steps