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
Quick Start
Installation
Cargo:
Homebrew:
Arch Linux:
# 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
--color=on||)
--except=CMD,...
|||)
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
Advanced Features
Count/Replace
# Match only once per line
regexp=^\s*#
colours=cyan
count=once
# Replace matched text (with backreferences)
regexp=(ERROR|WARN|INFO)
colours=red,yellow,green
replace=[\1]
# Stop processing after match
regexp=^FATAL
colours=red,bold
count=stop
Count options: once, more (default), stop
Replace: Supports \1, \2, etc.
Development
# Build
# Test
# Install locally
&&
License
MIT - see LICENSE for details.
Credits
Inspired by grc by Radovan GarabΓk and grc-rs by Lars Christensen.