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 -s
or--size
β show file sizes -
peek -a
or--all
β include hidden files -
peek -l
or--long
β show metadata (uid/gid/perm) -
peek -t
or--tree
β display tree structure -
peek -d 2
or--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 π¦
-
clap
for CLI parsing -
walkdir
for directory traversal -
regex
+globset
for pattern matching -
colored
for styled output -
dirs
andserde_json
for 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
peek
a 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)