https://github.com/tikrack/peek
A modern, colorful and fast alternative to ls, written in Rust — explore directories your way.
https://github.com/tikrack/peek
cli dir linux list low-level-programming ls peek rust
Last synced: 3 months ago
JSON representation
A modern, colorful and fast alternative to ls, written in Rust — explore directories your way.
- Host: GitHub
- URL: https://github.com/tikrack/peek
- Owner: tikrack
- License: mit
- Created: 2025-07-13T09:49:15.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-13T11:13:27.000Z (3 months ago)
- Last Synced: 2025-07-13T11:39:39.110Z (3 months ago)
- Topics: cli, dir, linux, list, low-level-programming, ls, peek, rust
- Language: Rust
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# peek
`peek` is a modern, customizable, and extensible `ls` replacement written in Rust. It supports file listing, tree view, size formatting, filtering, and more — with beautiful color output.
## ✨ Features
- 📁 Basic file listing (like `ls`)
- 🎨 Colored output with custom folder color (hex)
- 📦 File size display (`--size` or `-s`)
- 🧾 Long format listing (`--long` or `-l`) with permissions, size, UID, GID, and modified time
- 🌲 Tree view (`--tree` or `-t`) with optional `--depth N`
- 👻 Show hidden files (`--all` or `-a`)
- 🔍 Glob pattern filtering (`--pattern` or `-p`)
- 🧠 Persistent color configuration saved in `~/.peekconfig`## 🧪 Usage
### Basic Listing
```sh
peek
```### Show file sizes
```sh
peek --size
peek -s
```### Long listing
```sh
peek --long
peek -l
```### Tree view
```sh
peek --tree
peek -t
```### Tree with depth
```sh
peek -t --depth 2
```### Show hidden files
```sh
peek --all
peek -a
```### Set custom folder color
```sh
peek --dir-color FF00FF
peek --dir-color "#00FFFF"
```(This is saved persistently in `~/.peekconfig`)
### Pattern matching (glob)
```sh
peek -p "*.rs" # match all .rs files in current dir
peek -t -p "**/*.rs" # match recursively all .rs files
peek -a -p "*lib*" # match files with 'lib' in the name
```## 🛠 Installation
1. Make sure you have Rust installed:
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```2. Clone and build:
```sh
git clone https://github.com/yourname/peek.git
cd peek
cargo build --release
```3. Optionally copy the binary to your bin directory:
```sh
cp target/release/peek ~/.local/bin/
```## 📂 Configuration
Configuration is stored in a JSON file at:
```
~/.peekconfig
```Example content:
```json
{
"dir_color": "FF00FF"
}
```## 🔮 Coming Soon
- Recursive search (`--recursive`)
- Output to JSON format
- Sort by size/date/name## 📄 License
MIT