tre
Modern tree replacement with editor integration
TLDR
SYNOPSIS
tre [-a] [-l depth] [-e] [options] [path]
DESCRIPTION
tre is a modern replacement for the classic tree command, written in Rust. It displays directory structures in a tree format with additional features designed for developer workflows, including editor integration and gitignore awareness.The editor integration mode (-e) numbers each file in the output and creates a shell alias that opens the corresponding file in your editor by number. Portable path mode (-p) outputs paths that can be directly copied and pasted into other commands.By default, tre respects `.gitignore` rules, filtering out ignored files for a cleaner view of project structures. Hidden files are excluded unless explicitly requested with -a.
PARAMETERS
-a, --all
Include hidden files.-d, --directories
Only list directories.-l, --limit DEPTH
Maximum depth.-e, --editor [COMMAND]
Editor integration (numbers files, creates aliases).-E, --exclude PATTERN
Exclude paths matching a regex. Repeatable.-j, --json
Output JSON instead of tree diagram.-p, --portable
Portable absolute paths in editor aliases.-s, --simple
Ignore .gitignore rules.-c, --color WHEN
Color output: automatic, always, never.
CAVEATS
Not a drop-in replacement for tree — uses different flag names (e.g. -l instead of -L for depth). Respects .gitignore by default, which can be disabled with -s.
