macOS
brew install tre-commandlocal Homebrew formula metadata
安装
brew install tre-commandlocal Homebrew formula metadata
sudo apt install tre-commandDebian stable package indexes · tre-command · 来源: deb.debian.org
nix profile install nixpkgs#tre-commandnixpkgs package indexes · pkgs/by-name/tr/tre-command/package.nix · 来源: api.github.com
sudo apk add treAlpine Linux edge package indexes · tre · 来源: dl-cdn.alpinelinux.org
sudo dnf install treFedora Rawhide package metadata · tre · 来源: dl.fedoraproject.org
sudo pacman -S treArch Linux sync databases · tre · 来源: geo.mirror.pkgbuild.com
sudo zypper install agrepopenSUSE Tumbleweed package metadata · agrep · 来源: download.opensuse.org
scoop install main/tre-commandScoop official bucket manifest trees · bucket/tre-command.json · 来源: api.github.com
winget install --id duan.tre -eWindows Package Manager source index · duan.tre · 来源: cdn.winget.microsoft.com
概览
Tree command, improved
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
tre | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:tre-command |
|---|---|
| 版本 | 0.4.0 |
| 软件包管理器 | Homebrew |
| 主页 | https://github.com/dduan/tre |
| 仓库 | https://github.com/dduan/tre |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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 tre来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.