Elevate Your Command Line Experience with Rust
For developers and system administrators, the command line interface (CLI) is an indispensable environment. While traditional Unix commands have served us faithfully for decades, the open-source community, particularly within the Rust ecosystem, is continually innovating. This article explores 27 powerful Rust-based CLI tools that offer enhanced performance, improved ergonomics, and a more delightful user experience, making them compelling replacements for your everyday utilities.
Rust\’s focus on safety, speed, and concurrency makes it an ideal language for building robust command-line applications. These modern alternatives often bring features like better default behaviors, intuitive syntax, syntax highlighting, and performance optimizations that can significantly boost your productivity.
1. `grep` → `ripgrep (rg)` (55.0k ⭐)
Leave your traditional grep
behind and embrace ripgrep
. This lightning-fast search tool excels at recursively scanning directories while intelligently respecting your .gitignore
files. By default, ripgrep
automatically skips binary and hidden files, dramatically speeding up searches and delivering more relevant results. Its performance gains stem from advanced parallelization and smart file filtering, preventing unnecessary scans of node_modules
or build artifacts. It\’s a grep
on steroids.
# grep
grep -r "TODO" src/
# rg
rg "TODO" src/
2. `cat` → `bat` (54.2k ⭐)
bat
is far more than just a cat
replacement; it\’s a file viewer reimagined for developers. It automatically provides beautiful syntax highlighting for hundreds of languages, adds line numbers, and even integrates with Git to show file modifications. For longer outputs, bat
intelligently pipes to your system\’s pager, ensuring a comfortable viewing experience. Reviewing code or logs in the terminal becomes a genuinely pleasant task.
# cat
cat main.rs
# bat
bat main.rs
3. `find` → `fd` (39.5k ⭐)
Say goodbye to find
\’s complex syntax. fd
offers a simpler, faster, and more user-friendly way to locate files. It supports powerful regex, delivers clear colorized output, and leverages parallel execution for speed. Crucially, fd
ignores hidden and Git-ignored files by default, significantly reducing clutter in your search results. Finding files by extension or name is now intuitive and quick.
# find
find . -name "*.rs"
# fd
fd -e rs
4. `cd` → `zoxide` (29.3k ⭐)
Navigate your file system with unprecedented ease using zoxide
. This intelligent tool learns your most frequently visited directories and allows you to jump to them with just a partial name, using a “frecency” (frequency + recency) algorithm. zoxide
effectively eliminates the tedium of typing long, repetitive cd
commands, making directory navigation seamless and efficient.
# cd
cd /home/user/projects/myproject
# z
z myproject
5. `make` → `just` (27.5k ⭐)
Simplify your project\’s command execution with just
. While make
can be powerful, its syntax often leads to complexity. just
provides a straightforward, readable format for organizing and running development tasks and project-specific commands. It focuses on the commands themselves rather than intricate dependency management, making it easier to define and execute common operations within your projects.
# make
make build
# just
just build
6. `diff` → `delta` (27.4k ⭐)
Transform your diff
output into a visually stunning and highly readable format with delta
. This tool enhances standard diffs with rich syntax highlighting, making it incredibly easy to pinpoint changes within lines, not just which lines were added or removed. It supports side-by-side views and integrates seamlessly with Git as a pager, providing a superior code review experience right in your terminal.
# diff
diff -u file1.txt file2.txt
# delta
diff -u file1.txt file2.txt | delta
7. `time` → `hyperfine` (26.0k ⭐)
For accurate command benchmarking, move beyond time
and utilize hyperfine
. This sophisticated tool statistically benchmarks commands by running multiple iterations with warmups, ensuring reliable and precise measurements. It provides comprehensive statistical analysis, including mean, median, and standard deviation, giving you a deep understanding of your command\’s performance characteristics.
# time
time ls -la
# hyperfine
hyperfine 'ls -la'
8. `ls` → `lsd` (14.8k ⭐)
Reinvent your directory listings with lsd
. This aesthetic ls
alternative brings vibrant colors, intuitive icons, Git status indicators, and an optional tree view to your terminal. While respecting existing ls
flags, lsd
provides a much clearer visual hierarchy, allowing you to quickly grasp file types, permissions, and Git modifications at a glance without needing separate commands.
# ls
ls -la
# lsd
lsd -la
9. `top/htop` → `bottom (btm)` (11.8k ⭐)
Monitor your system with a modern, interactive twist using bottom
. This powerful tool presents system metrics as engaging graphs, seamlessly combining process management with real-time resource monitoring in a single, user-friendly interface. Unlike static text-based displays, bottom
\’s graphical representations offer invaluable historical context, making it easier to identify trends and performance bottlenecks.
# top
top
# btm
btm
10. `tree` → `broot` (11.7k ⭐)
Navigate complex directory structures with broot
, an interactive and highly efficient tree
alternative. Instead of a static listing, broot
allows you to dynamically filter, navigate, and execute actions on selections within your file system. Its fuzzy matching capabilities and intuitive modal interface drastically speed up the process of finding and managing files, especially in large projects.
# tree
tree -L 2
# broot
broot --sizes
11. `du` → `dust` (10.4k ⭐)
Gain immediate insights into your disk usage with dust
. This visual du
replacement displays disk space consumption with clear bar charts and smart recursion, making it instantly obvious which directories are occupying the most space. You can even filter results by regex to quickly identify space hogs by specific file types, streamlining your disk cleanup efforts.
# du
du -sh *
# dust
dust
12. `hexdump/xxd` → `hexyl` (9.8k ⭐)
When inspecting binary files, hexyl
provides a vastly improved experience over hexdump
or xxd
. It intelligently colors hex output, making it easier to distinguish between offsets, individual bytes, and their ASCII representations. This color-coded output is invaluable for identifying structures, patterns, and different byte values within binary data, enhancing clarity during deep dives into file formats.
# xxd
xxd file.bin
# hexyl
hexyl file.bin
13. `curl` → `xh` (6.8k ⭐)
Simplify your HTTP interactions with xh
, a user-friendly alternative to curl
. Inspired by httpie
, xh
offers a concise and intuitive syntax for making HTTP requests. It automatically outputs readable responses with intelligent formatting, reducing the complexity often associated with common API interactions and making debugging much more efficient.
# curl
curl https://httpbin.org/json
# xh
xh GET https://httpbin.org/json
14. `sed` → `sd` (6.5k ⭐)
sd
offers a refreshingly simple approach to search and replace operations, especially compared to sed
\’s often cryptic command language. It uses regex by default, but you can easily switch to literal matches with the -F
flag, eliminating the need for complex escaping. The straightforward find-and-replace syntax of sd
significantly lowers the cognitive load for text manipulation tasks.
# sed
sed -i 's/foo/bar/g' file.txt
# sd
sd 'foo' 'bar' file.txt
15. `dig` → `dog` (6.5k ⭐)
dog
is a modern, user-friendly DNS client that outshines dig
with its colored output and advanced features. It provides clear, color-coded responses that group related records and highlight important fields, making DNS query results much easier to parse. Furthermore, dog
supports modern DNS workflows like DNS over TLS, HTTPS, and JSON export, catering to contemporary network analysis needs.
# dig
dig example.com
# dog
dog example.com
16. `ps` → `procs` (5.7k ⭐)
Monitor your system\’s processes with procs
, a vibrant and feature-rich replacement for ps
. It displays processes in beautifully colored tables, offering enhanced readability. procs
includes built-in search, a clear tree view, and live updates without requiring additional flags, presenting the most relevant information in an easily scannable and digestible format.
# ps
ps aux
# procs
procs
17. `man` → `tealdeer (tldr)` (5.4k ⭐)
When you need quick command help without sifting through exhaustive man
pages, tealdeer
is your go-to. This tool provides concise, example-driven summaries of commands, focusing on common use cases rather than comprehensive documentation. Its pages are cached locally for instant access, ensuring you get the information you need without network delays, making it perfect for quick reminders and practical examples.
# man
man tar
# tldr
tldr tar
18. `sudo` → `sudo-rs` (3.9k ⭐)
For enhanced security, consider sudo-rs
, a reimplementation of the crucial sudo
utility in memory-safe Rust. This project prioritizes security and has even been adopted by Ubuntu 25.10 as its default sudo
implementation. By leveraging Rust\’s inherent memory safety guarantees, sudo-rs
effectively eliminates entire classes of vulnerabilities, offering a more robust and secure elevated privilege mechanism.
# sudo
sudo apt update
# sudo-rs
sudo-rs apt update
19. `cut` → `choose` (2.0k ⭐)
choose
simplifies the task of extracting fields from text streams, offering a more intuitive approach than cut
. It utilizes zero-based indexing and Python-style ranges, making it easier to select specific fields or ranges, including working from the end of lines. Additionally, choose
supports regex separators, providing greater flexibility for handling complex delimiters in your data processing pipelines.
# cut
cut -d, -f1,3 data.csv
# choose
choose -f, 0 2 data.csv
20. `rm` → `rip` (1.6k ⭐)
Avoid accidental data loss with rip
, a safer alternative to rm
. Instead of permanently deleting files, rip
moves them to a “graveyard” (trash can), providing a safety net and making deletions easily reversible. The graveyard is intelligently managed, with automatic cleanup based on age or size limits, offering peace of mind for your file management operations.
# rm
rm file.txt
# rip
rip file.txt
21. `awk` → `frawk` (1.3k ⭐)
Supercharge your awk
scripts with frawk
, a high-performance alternative that leverages JIT compilation for accelerated execution. frawk
includes native support for CSV and TSV formats, eliminating the need for manual field separator configurations. The performance gains are particularly noticeable when processing large files, where the JIT compiler can significantly optimize hot paths, making your data manipulation tasks faster than ever.
# awk
awk -F, '{print $1}' data.csv
# frawk
frawk -d, '{print $1}' data.csv
22. `bc` → `eva` (894 ⭐)
eva
offers a more visually appealing and interactive experience for command-line calculations compared to bc
. It provides syntax highlighting for expressions and features a comfortable REPL (Read-Eval-Print Loop) with history, perfect for interactive calculations. eva
supports all common mathematical functions and constants out-of-the-box, making complex arithmetic simple and engaging in your terminal.
# bc
echo "2 + 2" | bc
# eva
eva "2 + 2"
23. `cp` → `xcp` (840 ⭐)
Enhance your file copying experience with xcp
, which adds much-needed progress bars to transfers. For large files or extensive directory trees, xcp
automatically optimizes transfers using platform-specific techniques, ensuring efficiency. The visual progress indication is especially valuable for long-running operations, providing clear feedback on the status of your file copies.
# cp
cp -r source/ dest/
# xcp
xcp -r source/ dest/
24. `xargs` → `rargs` (549 ⭐)
rargs
takes the power of xargs
to the next level by introducing regex capture groups into command templates. This allows for highly flexible and dynamic transformations of filenames and arguments as part of your command execution. rargs
also supports efficient batch operations and parallel execution, leading to significant performance improvements for complex command pipelines.
# xargs
ls *.txt | xargs -I {} mv {} {}.bak
# rargs
ls *.txt | rargs -p '(.*)' mv {0} {0}.bak
25. `rename` → `rnr` (548 ⭐)
rnr
offers a robust and safe way to batch rename files using powerful regex patterns, surpassing the capabilities of traditional rename
utilities. It features a crucial dry-run mode that shows you exactly what changes will occur before committing, preventing collisions and allowing for easy undo. This intelligent preview significantly reduces the risk of accidental renaming mistakes, providing confidence for large-scale file organization.
# rename
rename 's/\.bak$//' *.bak
# rnr
rnr -f '(.*)\.bak' '$1' *.bak
26. `sort | uniq` → `huniq` (251 ⭐)
For removing duplicate lines while preserving the original input order, huniq
is a superior alternative to the traditional sort | uniq
pipeline. huniq
efficiently identifies and removes duplicates without the need for sorting, which is invaluable for scenarios where maintaining chronological sequences, priority orderings, or other inherent input order is critical.
# sort | uniq
sort file.txt | uniq
# huniq
huniq < file.txt
27. `strings` → `stringsext` (125 ⭐)
When you need to extract human-readable strings from binary files, stringsext
goes beyond the capabilities of GNU strings
. While GNU strings
offers encoding options, stringsext
intelligently detects and handles multiple encodings, including Unicode and various non-Western character sets, out of the box. This makes stringsext
an indispensable tool for analyzing modern binaries that often contain a diverse range of string encodings.
# strings
strings binary.exe
# stringsext
stringsext binary.exe