treels is a Go CLI that blends the quick scan of ls with the structure of tree.
Use it to inspect directories as a compact grid, expand them as a tree, hide project noise with
.gitignore, show detailed metadata, and keep large repositories readable with depth limits.
treels # compact ls-style view
treels --tree # recursive tree view
treels --tree --depth 2 # tree view limited to two levels
treels --tree --gitignore # exclude root .gitignore matches
treels --tree --dirs-only # show directory structure only
treels --long --readable # detailed listing with readable sizes
treels --include "*.go" # show only matching files
treels --exclude "*.log" # hide matching files
treels --git-status # show Git state next to entries
treels --sort size --reverse # sort entries by largest first
treels --dirs-first # group directories before files
treels --json # machine-readable output
treels --no-icons # fallback for terminals without Nerd FontsNote
File and folder icons look best with a Nerd Font installed. If your terminal does not support
Nerd Font glyphs, use --no-icons.
go install github.com/oussamaM1/treels@latestMake sure your Go binary directory is in your PATH. You can check where Go installs binaries with:
go env GOPATHThe binary is usually placed in:
$(go env GOPATH)/bin
git clone https://github.com/OussamaM1/treels.git
cd treels
go build .
./treels --version| Feature | Flag |
|---|---|
| Compact grid listing | default |
| Recursive tree view | -t, --tree |
| Depth limit | --depth N |
| Detailed metadata | -l, --long |
| Human-readable sizes | -r, --readable |
| Include/exclude filters | --include PATTERN, --exclude PATTERN |
| Git status decorations | --git-status |
| Sorting | `--sort name |
| JSON output | --json |
| Hidden files | -a, --all |
| Directory-only view | --dirs-only |
Respect root .gitignore |
--gitignore |
| Disable icons | --no-icons |
| Hide text summary | --no-summary |
| Version output | -v, --version |
treels [flags] [path]If no path is provided, treels lists the current directory.
For detailed usage examples and flag interactions, see docs/usage.md.
Examples below use --no-icons so output is readable in any terminal.
$ treels --no-icons file-icons-example
.
Dockerfile Main.kt Program.cs
app.conf app.lock app.log
app.rb app.swift backup.zip
c-file.c class-java-file.class component.vue
config.xml cpp-file.cpp document.pdf
index.html index.php java-file.java
javascript-file.js json-file.json logo.png
main.tf package.json plb-file.plb
pls-file.pls python-file.py react-component.jsx
react-typescript.tsx rust-file.rs script.sh
song.mp3 sql-file.sql styles.css
typescript-file.ts video.mp4 yaml-file.yml
0 directories, 36 files
$ treels --tree --depth 1 --gitignore --no-icons
.
├── LICENSE
├── README.md
├── cmd
├── docs
├── example
├── file-icons-example
├── go.mod
├── go.sum
├── main.go
├── module
├── service
└── utils
7 directories, 5 files
$ treels --long --readable --no-icons service
.
-rw-r--r-- 3.8 KB 2026-06-10 gitignore.go
-rw-r--r-- 4.0 KB 2026-06-10 json.go
-rw-r--r-- 7.1 KB 2026-06-10 service.go
-rw-r--r-- 35.0 KB 2026-06-10 service_test.go
-rw-r--r-- 18.0 KB 2026-06-10 util.go
0 directories, 5 files
go test ./...
go vet ./...
golangci-lint run
go build .See docs/development.md for more details.
This project is licensed under the terms in LICENSE.
