Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Command-Line Apps
  3. tre

tre

MITRustv0.4.0

A modern tree command with gitignore support and editor aliases for quick file access.

GitHubGitHub
1.2k stars27 forks0 contributors

What is tre?

tre is a modern command-line tool that displays directory structures in a tree-like diagram, similar to the classic `tree` command. It enhances developer workflows by integrating with gitignore settings to skip ignored files and providing editor aliasing for quick file navigation. The tool offers colorized output, multiple formats like JSON, and cross-platform support for macOS, Linux, and Windows.

Target Audience

Developers and system administrators who frequently navigate and inspect directory structures in terminal environments, particularly those working in git repositories and seeking efficient file management. It's especially useful for users who want visual directory listings with actionable shortcuts for editing files.

Value Proposition

Developers choose tre over traditional tree tools for its seamless gitignore integration, which automatically filters out ignored files, and its unique editor aliasing feature that creates numbered shell aliases for rapid file opening. Its cross-platform compatibility and support for multiple output formats provide flexibility and enhanced productivity compared to basic alternatives.

Overview

Tree command, improved.

Use Cases

Best For

  • Quickly navigating and editing files in git repositories with automatic filtering of ignored files.
  • Generating colorized directory tree diagrams for documentation or presentations.
  • Creating shell aliases for efficient file access in terminal-based workflows.
  • Exporting directory structures as JSON for scripting or data processing.
  • Limiting tree depth to focus on specific levels of a directory hierarchy.
  • Cross-platform development environments requiring consistent directory listing tools.

Not Ideal For

  • Environments where shell scripting or terminal customization is not permitted or feasible
  • Projects not using git version control, as gitignore integration becomes irrelevant
  • Users who prefer graphical file explorers or minimal command-line tools without additional features
  • Scripts or automated pipelines requiring plain, uncolored output without aliasing overhead

Pros & Cons

Pros

Gitignore Integration

Automatically filters out files listed in .gitignore, providing cleaner output in repositories. The README highlights this as a core feature that 'skips ignored files in git repositories per .gitignore setting.'

Editor Aliasing Efficiency

Creates numbered shell aliases for rapid file opening, reducing navigation time. Evidence includes the demo where typing 'e8' opens a file, and the README explains how -e flag enables this.

Cross-Platform Compatibility

Works seamlessly on macOS, Linux, and Windows with detailed setup instructions for each shell. The install section lists package managers like Homebrew, Scoop, and Cargo for various OSes.

Flexible Output Options

Supports multiple formats including JSON and tree diagrams with depth limiting. Options like -j for JSON and -l for limit are documented in the help output.

Cons

Shell Configuration Burden

Editor aliasing requires manual setup in shell config files (e.g., .bashrc or PowerShell scripts), which can be complex and error-prone for users. The README dedicates a full section to platform-specific configuration steps.

Git-Centric Design

Heavily relies on git for its key feature; in non-git directories, the gitignore integration offers no benefit, making it less versatile than generic tree tools.

No Built-in Search

Lacks file content search capabilities, focusing solely on directory listing. This limits utility compared to tools like 'find' or 'grep' for locating specific files.

Frequently Asked Questions

Quick Stats

Stars1,196
Forks27
Contributors0
Open Issues16
Last commit1 year ago
CreatedSince 2019

Tags

#developer-tools#gitignore#terminal#command-line-tool#directory-listing#cross-platform#file-navigation#rust

Built With

C
Cargo
R
Rust

Included in

Command-Line Apps19.2kTerminals Are Sexy12.9k
Auto-fetched 1 hour ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars79,874
Forks2,794
Last commit1 day ago
ripgrepripgrep

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

Stars63,072
Forks2,528
Last commit2 months ago
tldrtldr

Collaborative cheatsheets for console commands 📚.

Stars62,294
Forks5,207
Last commit2 hours ago
zoxidezoxide

A smarter cd command. Supports all major shells.

Stars36,160
Forks809
Last commit15 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub