Self-contained live-grep file search in Rust. srchr searches file names and
file contents, merges the results into an interactive terminal UI, previews the
selected file with syntax highlighting, and opens your selection in $EDITOR.
Runtime external dependency: $EDITOR only.
srchr- Type to run a live smart-case regex search over file names and file contents.
- Results are deduplicated file rows.
- Content hits show a match count, sorted before name-only hits.
- Name-only hits show
[name]. - The preview highlights the first content match with context above it, or shows the file from the top for name-only hits.
- Pressing
Enteropens$EDITOR +<line> <file>for content hits, or$EDITOR <file>for name-only hits.
- Rust toolchain to build from source.
$EDITORset to an editor that understands+<line>for line jumps (vim, nvim, helix, kakoune, nano, ...).
If $EDITOR is unset or empty, srchr exits with a clear error.
cargo build --manifest-path rust/Cargo.toml --releaseThe binary is at rust/target/release/srchr.
cargo fmt --manifest-path rust/Cargo.toml -- --check
cargo clippy --manifest-path rust/Cargo.toml -- -D warnings
cargo test --manifest-path rust/Cargo.tomlThe interactive TUI still needs a manual TTY smoke test:
cargo run --manifest-path rust/Cargo.toml -- .brew install webcodr/tap/srchrInstall the latest release binary to ~/.local/bin/srchr:
curl -fsSL https://raw.githubusercontent.com/webcodr/srchr/main/install.sh | shInstall a specific release or a custom directory by setting environment
variables on the sh side of the pipeline:
curl -fsSL https://raw.githubusercontent.com/webcodr/srchr/main/install.sh | \
SRCHR_VERSION=v0.1.0 sh
curl -fsSL https://raw.githubusercontent.com/webcodr/srchr/main/install.sh | \
INSTALL_DIR="$HOME/bin" shThe installer supports Linux and macOS on x86_64 and aarch64.
To build from source instead, build the release binary and place it somewhere on
your PATH:
cargo build --manifest-path rust/Cargo.toml --release
install -Dm755 rust/target/release/srchr ~/.local/bin/srchr- Search respects gitignore rules.
- Search terms are smart-case regexes for both content and filename matches.
- Selected relative paths starting with
+or-are normalized before invoking$EDITOR, so option/command-looking paths are treated as data. - Preview uses an embedded default syntect theme; it does not read
batconfig or requirebatto be installed.