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
Loading reviews…
Similar apps

Code Editors & IDEs
ast-grep
A tool for code structural search, linting and rewriting.
File Management & Transfer
ripgrep
A line-oriented search tool that recursively searches your current directory for a regex pattern.

Terminals & CLI
grex
Generate regular expressions from user-provided test cases.
Terminals & CLI
semantic-grep
A tool for semantic search using word embeddings (e.g. search for "death" and find "dead", "killing", "murder".)

Terminals & CLI
Trimmy
Paste-once, run-once clipboard cleaner for terminal snippets
Terminals & CLI
rq
Record analysis and transformation tool