# Install tre-command with Homebrew, apt, Nix, scoop, winget, apk, dnf, MacPorts, pacman, zypper

Tree command, improved. Version 0.4.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:tre-command
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install tre-command
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tre
```

  Evidence: MacPorts ports tree: devel/tre/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install tre-command
```

  Evidence: Debian stable package indexes: tre-command from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#tre-command
```

  Evidence: nixpkgs package indexes: pkgs/by-name/tr/tre-command/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- apk (92%):

```sh
sudo apk add agrep
```

  Evidence: Alpine Linux edge package indexes: agrep from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install agrep
```

  Evidence: Fedora Rawhide package metadata: agrep from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S tre
```

  Evidence: Arch Linux sync databases: tre from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install agrep
```

  Evidence: openSUSE Tumbleweed package metadata: agrep from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/tre-command
```

  Evidence: Scoop official bucket manifest trees: bucket/tre-command.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id duan.tre -e
```

  Evidence: Windows Package Manager source index: duan.tre from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:tre-command
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/tre-command>
- **Version:** 0.4.0
- **Source summary:** Tree command, improved
- **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>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- tre (cli)
- tre (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.4.0
- Local data: ok
- Upstream repository: https://github.com/dduan/tre
- Upstream latest detected: v0.4.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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`.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 0.0.1: Earliest public tag visible in the official Git repository tag list.
- 0.3.x: Tag series shows continued iteration after the initial releases.
- 2020s: README documents Homebrew, MacPorts, Debian testing, Scoop, winget, Cargo, AUR, pkgsrc, Nixpkgs, and Nix flake installation.

### Related projects

- Related to the classic Unix `tree` command.
- Related to gitignore-aware file discovery tools that keep generated or ignored paths out of developer-facing output.
- The README points users who like editor aliasing to the related `ea` project.

### Sources

- Batch input fields: source_facts.executables, source_facts.package-manager
- Official Git tag list: https://github.com/dduan/tre/tags
- Official README: https://github.com/dduan/tre#readme


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- Debian apt - tre-command - 0.4.0-7+b1: normalized package name match | Debian stable package indexes: tre-command from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tree command, improved | https://github.com/dduan/tre
- Nix - tre-command: normalized package name match | nixpkgs package indexes: pkgs/by-name/tr/tre-command/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - tre-command - 0.4.0-5: normalized package name match | Ubuntu 24.04 LTS package indexes: tre-command from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tree command, improved | https://github.com/dduan/tre
- Scoop - main/tre-command: normalized package name match | Scoop official bucket manifest trees: bucket/tre-command.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - duan.tre: normalized package name match | Windows Package Manager source index: duan.tre from https://cdn.winget.microsoft.com/cache/source.msix
- MacPorts - tre: installed executable or alias match | MacPorts ports tree: devel/tre/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - libtre-dev - 0.9.0-1: installed executable or alias match | Debian stable package indexes: libtre-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development package for the libtre5 regexp matching library | https://laurikari.net/tre/
- Debian apt - libtre5 - 0.9.0-1: installed executable or alias match | Debian stable package indexes: libtre5 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | regexp matching library with approximate matching | https://laurikari.net/tre/
- Debian apt - tre-agrep - 0.9.0-1: installed executable or alias match | Debian stable package indexes: tre-agrep from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | approximate grep utility based on the tre library | https://laurikari.net/tre/
- Nix - tre: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/tr/tre/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libtre-dev - 0.8.0-7: installed executable or alias match | Ubuntu 24.04 LTS package indexes: libtre-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | development package for the libtre5 regexp matching library | https://laurikari.net/tre/
- Ubuntu apt - libtre5 - 0.8.0-7: installed executable or alias match | Ubuntu 24.04 LTS package indexes: libtre5 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | regexp matching library with approximate matching | https://laurikari.net/tre/
- Ubuntu apt - tre-agrep - 0.8.0-7: installed executable or alias match | Ubuntu 24.04 LTS package indexes: tre-agrep from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | approximate grep utility based on the tre library | https://laurikari.net/tre/
- apk - agrep - 0.8.0-r2: installed executable or alias match | Alpine Linux edge package indexes: agrep from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | approximate grepping | https://laurikari.net/tre
- apk - agrep-doc - 0.8.0-r2: installed executable or alias match | Alpine Linux edge package indexes: agrep-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | POSIX compliant regexp matching library (documentation) | https://laurikari.net/tre
- apk - tre - 0.8.0-r2: installed executable or alias match | Alpine Linux edge package indexes: tre from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | POSIX compliant regexp matching library | https://laurikari.net/tre


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [tree](https://www.automicvault.com/pkg/brew/tree/) - Shares av.db curated category or tags: cli, directory-listing, filesystem, system.
- [facad](https://www.automicvault.com/pkg/brew/facad/) - Shares av.db curated category or tags: cli, directory-listing, filesystem, system.
- [lstr](https://www.automicvault.com/pkg/brew/lstr/) - Shares av.db curated category or tags: cli, filesystem, system, tree.
- [acl](https://www.automicvault.com/pkg/brew/acl/) - Shares av.db curated category or tags: cli, filesystem, system.
- [afuse](https://www.automicvault.com/pkg/brew/afuse/) - Shares av.db curated category or tags: cli, filesystem, system.
- [attr](https://www.automicvault.com/pkg/brew/attr/) - Shares av.db curated category or tags: cli, filesystem, system.
- [avfs](https://www.automicvault.com/pkg/brew/avfs/) - Shares av.db curated category or tags: cli, filesystem, system.
- [bindfs](https://www.automicvault.com/pkg/brew/bindfs/) - Shares av.db curated category or tags: cli, filesystem, system.
- [parallel-disk-usage](https://www.automicvault.com/pkg/brew/parallel-disk-usage/) - Local package facts share a topical domain. Shared terms: cli, directory, filesystem, system, tree.

## Combined YAML source

View the package source record on GitHub. [combined/tre-command.yml](https://github.com/automic-vault/db/blob/main/combined/tre-command.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
