Peek: A Fast, Colorful, Tree-Based ls Alternative Written in Rust
Have you ever wished that ls had more colors, better layout, or tree-like display built-in?
Let me introduce Peek ā a blazing-fast, customizable ls replacement built in Rust, supporting:
- ā Color configuration via command line
- ā Tree-style file listings
- ā File size and metadata output
- ā
Regex-style path filters (
*.rs,**/src, etc.) - ā Persistent color settings
- ā Cross-platform support (Linux and Windows)
š Why Peek?
Peek was built out of frustration with ls limitations, and inspired by tools like exa, lsd, and the beauty of Rust's safety + performance.
It provides a developer-focused and theme-aware alternative to standard directory listing.
š Features
-
peekā list current directory -
peek -sor--sizeā show file sizes -
peek -aor--allā include hidden files -
peek -lor--longā show metadata (uid/gid/perm) -
peek -tor--treeā display tree structure -
peek -d 2or--depth 2ā limit tree depth -
peek -p "*.rs"ā glob filtering -
peek --set-folder-color "#FF8800"ā persist folder color
And yes ā the color persists across commands š
š¦ Installation
š§ Build from source
If you have Rust installed:
git clone https://github.com/tikrack/peek.git
cd peek
cargo install --path .
Or just build manually:
cargo build --release
ā Cross-compile to Windows:
rustup target add x86_64-pc-windows-gnu
sudo pacman -S mingw-w64-gcc
cargo build --release --target x86_64-pc-windows-gnu
š Example Usage
peek -a -t --depth 2 -p "**/*.rs"
This will list all .rs files in tree format, including hidden files, up to 2 levels deep.
š¼ Screenshot
š§ Tech Stack
- Rust š¦
-
clapfor CLI parsing -
walkdirfor directory traversal -
regex+globsetfor pattern matching -
coloredfor styled output -
dirsandserde_jsonfor persistent config
š Repository
GitHub: github.com/tikrack/peek
Feel free to ā star, fork, and contribute!
⨠Conclusion
Peek is a simple but powerful tool that aims to bring beauty, control, and clarity to your terminal experience.
If you're a Rust enthusiast or terminal nerd ā give
peeka try and share your thoughts!
Iād love feedback, ideas, or PRs. ā¤ļø
š Bonus
You can download releases for Linux and Windows directly from Releases
Thanks for reading š
https://tikrack.ir
Top comments (0)