VibeHunt
Back to browse

srgn

A grep-like tool which understands code syntax and also allows for manipulation.

A command‑line utility that extends traditional grep with language‑aware searching and text manipulation. It accepts regular‑expression patterns and, optionally, a grammar‑based scope defined by tree‑sitter for a given programming language, limiting matches to syntactic elements such as class bodies or function definitions. When no actions are supplied the tool operates in search mode, printing matching lines with optional line numbers; when actions are provided, they are applied in order, starting with a positional replacement followed by flags like upper‑casing.

The design combines the simplicity of regex‑driven tools such as tr, sed, and ripgrep with the structural awareness of tree‑sitter, allowing precise modifications that would be difficult with plain text search alone. Users can chain multiple scopes and actions, enabling tasks like bulk renaming, case conversion, or custom transformations confined to language‑specific constructs.

Intended for developers and script writers who need fast, reproducible code‑wide refactoring or analysis from the terminal, the tool is stable, CLI‑only, and requires only familiarity with regular expressions and basic language syntax.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps