macOS
brew install tre-commandlocal Homebrew formula metadata
sudo port install treMacPorts ports tree · devel/tre/Portfile · source: api.github.com
brew
Tree command, improved. Version 0.4.0 via Homebrew; verified from local package data.
install
brew install tre-commandlocal Homebrew formula metadata
sudo port install treMacPorts ports tree · devel/tre/Portfile · source: api.github.com
sudo apt install tre-commandDebian stable package indexes · tre-command · source: deb.debian.org
nix profile install nixpkgs#tre-commandnixpkgs package indexes · pkgs/by-name/tr/tre-command/package.nix · source: api.github.com
sudo apk add agrepAlpine Linux edge package indexes · agrep · source: dl-cdn.alpinelinux.org
sudo dnf install agrepFedora Rawhide package metadata · agrep · source: dl.fedoraproject.org
sudo pacman -S treArch Linux sync databases · tre · source: geo.mirror.pkgbuild.com
sudo zypper install agrepopenSUSE Tumbleweed package metadata · agrep · source: download.opensuse.org
scoop install main/tre-commandScoop official bucket manifest trees · bucket/tre-command.json · source: api.github.com
winget install --id duan.tre -eWindows Package Manager source index · duan.tre · source: cdn.winget.microsoft.com
overview
Tree command, improved
history
tre-command is the packaged name for `tre`, Daniel Duan's Rust command-line directory tree lister. The official README describes it as a modern alternative to `tree` that respects `.gitignore`, uses colors compatible with LS_COLORS, can emit JSON, and can create editor-opening shell aliases for listed files.
The project modernizes the classic `tree` workflow for source-code directories. Its README puts Git-awareness first: in repositories, tre skips ignored files by default instead of showing generated or vendor files that developers usually do not want in a structural listing.
The standout feature is editor aliasing. With the `-e` option and small shell setup, tre writes temporary aliases like `e8` that open the numbered file shown in the tree output. The README documents setup for Bash, Zsh, Fish, PowerShell, and Command Prompt, showing that the project treats listing and navigation as one workflow.
The README documents wide package-manager distribution under names such as `tre-command`, `tre-tree`, and `tre`: Homebrew on macOS, MacPorts, Debian testing, Scoop, Windows Package Manager, Cargo, AUR, pkgsrc, Nixpkgs, and Nix flakes. The batch input records additional package-manager mappings for Homebrew, MacPorts, Nix, pacman, Scoop, Ubuntu, and winget.
This adoption pattern reflects a common packaging issue: the executable is `tre`, but package managers sometimes avoid name collisions by shipping it as `tre-command`.
Users run `tre [OPTIONS] [PATH]` to list a directory tree. Options include showing hidden files, listing only directories, excluding regex patterns, limiting depth, emitting JSON, controlling color, bypassing gitignore behavior with simple mode, and generating editor aliases.
The package is especially useful in codebases where classic `tree` output is too noisy. By honoring `.gitignore` and LS_COLORS and by supporting JSON output, it fits both interactive terminal browsing and scripting.
For package nerds, tre-command is a tidy example of a Rust rewrite that earns its packaging slot by adding source-control-aware defaults and shell integration, not merely by reimplementing an older Unix command.
Its package-manager matrix matters because users often install tree-like utilities everywhere: laptops, CI images, Windows dev environments, and Nix shells. The formula name `tre-command` also documents the ecosystem's need to disambiguate package names.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
tre | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:tre-command |
|---|---|
| Version | 0.4.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/tre-command |
| Homepage | https://github.com/dduan/tre |
| Repository | https://github.com/dduan/tre |
| Upstream docs | https://github.com/dduan/tre#readme |
| License | MIT |
| Source archive | https://github.com/dduan/tre/archive/refs/tags/v0.4.0.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | tre-command |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
tre-command 0.4.0-7+b1
Tree command, improved
sudo apt install tre-commandtre-command
nix profile install nixpkgs#tre-commandtre-command 0.4.0-5
Tree command, improved
sudo apt install tre-commandmain/tre-command
scoop install main/tre-commandduan.tre
winget install --id duan.tre -etre
sudo port install trelibtre-dev 0.9.0-1
development package for the libtre5 regexp matching library
sudo apt install libtre-devlibtre5 0.9.0-1
regexp matching library with approximate matching
sudo apt install libtre5tre-agrep 0.9.0-1
approximate grep utility based on the tre library
sudo apt install tre-agreptre
nix profile install nixpkgs#trelibtre-dev 0.8.0-7
development package for the libtre5 regexp matching library
sudo apt install libtre-devlibtre5 0.8.0-7
regexp matching library with approximate matching
sudo apt install libtre5tre-agrep 0.8.0-7
approximate grep utility based on the tre library
sudo apt install tre-agrepagrep 0.8.0-r2
approximate grepping
sudo apk add agrepagrep-doc 0.8.0-r2
POSIX compliant regexp matching library (documentation)
sudo apk add agrep-doctre 0.8.0-r2
POSIX compliant regexp matching library
sudo apk add tresource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.