#terminal-visualization #tree #visualization #file-system-tree

app fstree

fstree - A blazing fast File System Tree command in Rust with smart file type icons

2 releases

Uses new Rust 2024

0.1.1 Feb 8, 2026
0.1.0 Feb 8, 2026

#392 in Filesystem

MIT license

19KB
410 lines

๐ŸŒณ fstree

File System Tree (fstree) - A blazing fast directory listing command in Rust

Crates.io License Rust Edition Build Downloads

๐Ÿš€ Features

  • โšก Blazing Fast: Built with Rust for maximum performance.
  • ๐ŸŽจ Smart Icons: Automatically detects file types (Rust, Python, Images, etc.).
  • ๐Ÿ› ๏ธ Zero Dependencies: A single static binary.

๐Ÿ“ฆ Installation

cargo install fstree

Or build from source:

git clone https://github.com/your-username/fstree.git
cd fstree
cargo install --path .

๐Ÿ’ป Usage & Examples

Example 1: Basic Directory Listing

# List current directory
$ fstree
.
โ”œโ”€โ”€ ๐Ÿ“‚ src
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ€ main.rs
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ€ lib.rs
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ utils
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml
โ”œโ”€โ”€ ๐Ÿ“ README.md
โ”œโ”€โ”€ ๐Ÿ“‚ tests
โ”‚   โ””โ”€โ”€ ๐Ÿงช test_basic.rs
โ””โ”€โ”€ ๐Ÿ“ฆ target

Example 2: Limit Depth

# Show only 2 levels deep
$ fstree -d 2
.
โ”œโ”€โ”€ ๐Ÿ“‚ src
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ config
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‹ settings.json
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.rs
โ”‚   โ””โ”€โ”€ ๐Ÿฆ€ lib.rs
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml
โ”œโ”€โ”€ ๐Ÿ“ README.md
โ””โ”€โ”€ ๐Ÿ“ฆ target

Example 3: Show Hidden Files

# Include files starting with .
$ fstree -a
.
โ”œโ”€โ”€ ๐Ÿ“‚ .git
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ฆ HEAD
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ฆ config
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ hooks
โ”œโ”€โ”€ ๐Ÿ“‚ .vscode
โ”‚   โ””โ”€โ”€ โš™๏ธ settings.json
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore
โ”œโ”€โ”€ ๐Ÿ“‚ src
โ”‚   โ””โ”€โ”€ ๐Ÿฆ€ main.rs
โ””โ”€โ”€ ๐Ÿ“ README.md

Example 4: Target Specific Path

# List another directory
$ fstree -p ./my-project
my-project
โ”œโ”€โ”€ ๐ŸŒ index.html
โ”œโ”€โ”€ ๐ŸŽจ style.css
โ”œโ”€โ”€ ๐Ÿ“œ app.js
โ”œโ”€โ”€ ๐Ÿ“‚ api
โ”‚   โ””โ”€โ”€ ๐Ÿฆ€ main.rs
โ””โ”€โ”€ ๐Ÿ“„ package.json

Example 5: Exclude Files/Folders

# Exclude single folder
$ fstree -e node_modules
.
โ”œโ”€โ”€ ๐Ÿ“‚ src
โ”‚   โ””โ”€โ”€ ๐Ÿฆ€ main.rs
โ”œโ”€โ”€ ๐Ÿ“„ package.json
โ””โ”€โ”€ ๐Ÿ“ README.md

# Exclude multiple items
$ fstree -e node_modules -e .git -e dist
.
โ”œโ”€โ”€ ๐Ÿ“‚ src
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml
โ””โ”€โ”€ ๐Ÿ“ README.md

# Exclude with other options
$ fstree -d 2 -a -e .vscode -e .github

โš™๏ธ Options Reference

Option Description Example
-p, --path PATH Target directory fstree -p ./src
-d, --depth NUM Limit depth levels fstree -d 3
-a, --all Show hidden files fstree -a
-e, --exclude PATTERN Exclude files/folders fstree -e node_modules
-h, --help Show help fstree --help
-V, --version Show version fstree --version

๐Ÿ“„ License

MIT License


Made with โค๏ธ and ๐Ÿฆ€

Dependencies

~1โ€“12MB
~80K SLoC