2 releases
Uses new Rust 2024
| 0.1.1 | Feb 8, 2026 |
|---|---|
| 0.1.0 | Feb 8, 2026 |
#392 in Filesystem
19KB
410 lines
๐ณ fstree
File System Tree (fstree) - A blazing fast directory listing command in Rust
๐ 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