Rgx โ a regex debugger for the terminal (step-through execution, 3 engines, code generation)
โ Rust ๐ 2026-05-23 ๐ค surdeus ๐๏ธ 1I've been working on rgx, a terminal regex debugger written in Rust using ratatui + crossterm. Just shipped v0.12.3.
What makes it different from other terminal regex tools:
The main thing I haven't seen elsewhere is a step-through debugger (Ctrl+D, PCRE2) โ it traces execution with a dual-cursor visualization (pattern cursor + text cursor moving together), backtracking markers, and a heatmap mode that shows which parts of the pattern are matched
most often. Useful when a pattern works but you don't understand why, or when backtracking is making it slow.
Beyond that:
- 3 engines โ Rust
regex(default),fancy-regex(lookaround / backrefs), PCRE2. Auto-selects the simplest engine that supports your pattern's features. - Code generation (Ctrl+G) โ emits ready-to-paste code for Rust, Python, JS, Go, Java, C#, PHP, Ruby
- Generate regex from examples (Ctrl+X) โ grex overlay
- Live filter mode โ
rgx filterstreams stdin/file through a regex TUI;--json <PATH>extracts a specific JSONL field to match against - Batch/pipeline mode โ
echo "log" | rgx -p '\d+'with grep-like exit codes - Test suite mode โ TOML-based CI assertions (
rgx --test) - VS Code, Neovim, Zed, tmux integrations
Install:
cargo install rgx-cli
brew install brevity1swos/tap/rgx
1 post - 1 participant
๐ท๏ธ Rust_feed