tre is a command-line alternative to the traditional tree utility. It displays directory structures as hierarchical listings and adds features intended to make browsing source code repositories and opening files more convenient.
One of its distinctive capabilities is editor aliasing. The program can assign numbers to files in its output and generate shell aliases that open the corresponding files in a chosen editor. With suitable shell configuration, this allows users to navigate a directory listing and open a file without entering its complete path.
tre also understands Git ignore rules, making it useful for examining project directories without listing every ignored file or generated artifact.
This is free and open source software.
Key Features
- Displays files and directories using a traditional hierarchical tree layout.
- Uses colourized output and respects LS_COLORS settings where available.
- Excludes files and directories matching .gitignore rules by default.
- Can include normally ignored entries when requested.
- Generates numbered editor aliases for files in a directory listing.
- Uses the EDITOR environment variable or an explicitly selected editor when opening files through aliases.
- Supports alias integration with Bash, Zsh, Fish, PowerShell, and Windows Command Prompt.
- Limits directory listings to a specified recursion depth.
- Filters directory entries using regular expression patterns.
- Supports JSON output for use by other programs and scripts.
- Can generate absolute paths for editor aliases when portability is required.
- Offers a simple output mode that bypasses normal Git ignore handling.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: github.com/dduan/tre
Support:
Developer: Daniel Duan and contributors
License: MIT License

tre is written in Rust. Learn Rust with our recommended free books and free tutorials.
| Explore Linux | |
|---|---|
| Best Free and Open Source Software - A huge collection of recommended free and open source software covering every major category. | |
| In-depth Linux Software Reviews - Detailed assessments of Linux software covering features, usability and overall quality. | |
| The Big List of Active Linux Distros - An extensive collection of actively developed Linux distributions. | |
| Open Source Alternatives - Alternatives to software and services from Google, Microsoft, Apple, Adobe, IBM, Autodesk, Oracle and others. | |
| Essential Linux System Tools - Indispensable utilities for monitoring, maintaining and managing Linux systems. | |
| Linux Productivity Tools - Useful utilities for improving productivity and streamlining everyday tasks. | |
| Alternatives to Popular CLI Tools - Modern alternatives to familiar command-line utilities supplied with Linux systems. | |
| Awesome Free Linux Game Tools - Tools, utilities and companion software that improve gaming on Linux. | |
| Machine Learning on Linux - Machine learning and deep learning software, self-hosted applications and practical tools. | |
| Saving Money with Linux - Practical ways to reduce electricity consumption and lower computing costs with Linux. | |
| Linux Candy - Fun, entertaining and sometimes delightfully quirky software from the lighter side of Linux. | |

Please read our Comment Policy before commenting.