| Crates.io | bestls |
| lib.rs | bestls |
| version | 1.2.0 |
| created_at | 2025-07-04 10:16:52.139803+00 |
| updated_at | 2025-08-22 14:44:29.686642+00 |
| description | A fast and colorful Rust-based ls replacement CLI tool with JSON output and sorting options. |
| homepage | https://github.com/MurtadaNazar/bestls |
| repository | https://github.com/MurtadaNazar/bestls |
| max_upload_size | |
| id | 1737749 |
| size | 65,831 |
A fast, colorful, and Rust-powered replacement for the traditional ls command.
bestls provides human-readable file listings in both pretty tables and JSON formats, with sorting and other modern CLI conveniences built for speed and usability.
cargo install bestls
git clone https://github.com/MurtadaNazar/bestls.git
cd bestls
cargo build --release
The binary will be available at target/release/bestls.
List current directory:
bestls
List specific directory:
bestls -p /path/to/directory
Pretty table (default):
bestls
Compact JSON:
bestls --json
Pretty formatted JSON:
bestls --json-pretty
Sort by file size:
bestls -s size
Sort by modification date:
bestls -s date
Sort by name (default):
bestls -s name
bestls provides shell completions for Bash, Zsh, and Fish shells. To enable completions:
# For Bash
bestls completion bash > ~/.local/share/bash-completion/completions/bestls
# For Zsh
bestls completion zsh > ~/.zfunc/_bestls
# Then add this to your .zshrc if you haven't already:
# fpath=(~/.zfunc $fpath)
# For Fish
bestls completion fish > ~/.config/fish/completions/bestls.fish
# List home directory with size sorting
bestls -p ~ -s size
# Output current directory as pretty JSON
bestls --json-pretty
# List /etc directory sorted by modification date
bestls -p /etc -s date
# Show all files including hidden ones
bestls -a
# List files with full details (permissions, owner, group)
bestls -a -s date
View all available options:
bestls --help
| Option | Short | Description |
|---|---|---|
--path |
-p |
Directory path to list |
--sort |
-s |
Sort by: name, size, date |
--all |
-a |
Show hidden files |
--json |
Output compact JSON format | |
--json-pretty |
Output pretty formatted JSON | |
completion |
Generate shell completions | |
--help |
-h |
Show help information |
--version |
-V |
Show version information |
| Shell | Description |
|---|---|
bash |
Generate Bash completions |
zsh |
Generate Zsh completions |
fish |
Generate Fish completions |
Clone the repository:
git clone https://github.com/MurtadaNazar/bestls.git
cd bestls
Build the project:
cargo build --release
(Optional) Install globally:
cargo install --path .
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under: