rgrc - Rusty Generic Colouriser
A fast, Rust-based command-line tool that colorizes the output of other commands using regex-based rules. Drop-in replacement for grc with better performance.
Features
- Fast: 10x faster than original grc
- Rich Colorization: ANSI colors with count/replace support
- Compatible: Works with existing grc configuration files
- Shell Integration: Auto-generates aliases
- 80+ Commands: Pre-configured for common tools
- Smart Regex: Hybrid engine with optional fancy-regex support
- Lightweight: Minimal dependencies (2 core deps)
Quick Start
Installation
Shell (curl):
|
Cargo:
Homebrew:
Arch Linux:
Alpine Linux:
# Enable the testing repository (add edge testing)
|
NixOS:
Debian/Ubuntu:
# Download the latest .deb from releases and install
Usage
# Colorize any command
# Set up aliases (recommended)
# Then use commands directly
Supported Commands
System: df, free, ps, top, vmstat, iostat, uptime, mount
Network: ping, traceroute, netstat, ss, ip, curl, dig
Development: gcc, make, docker, kubectl, git, mvn, go
Files: ls, find, du, fdisk, lsof, stat
See full list in share/ directory
Options
||)
|||)
)
Configuration
Custom Rules
Create ~/.config/rgrc/conf.mycommand:
regexp=^ERROR
colours=red,bold
regexp=^WARNING
colours=yellow
regexp=^INFO
colours=green
Add to ~/.rgrc:
mycommand
conf.mycommand
Shell Completions
# Bash
# Zsh
# Fish
Development Guide
See DEVELOPMENT.md for instructions on adding new commands.
License
MIT - see LICENSE for details.
Credits
Inspired by grc by Radovan Garabík and grc-rs by Lars Christensen.