microsoft

    microsoft/tgrep

    Trigram-indexed grep with a client/server architecture for fast regex search in large codebases locally

    backend
    Rust
    MIT
    3.5K stars
    139 forks
    3.5K GitHub watchers
    Updated Oct 24, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    5 releases in the last 90 days, the latest 5 days ago, with 16 contributors on GitHub.

    Use Cases & Benefits

    • Provides a trigram-indexed grep tool with client/server architecture for fast regex searching in large local codebases.
    • Delivers significantly faster regex search performance than alternatives by narrowing queries to candidate files using trigram indexing and parallel verification.
    • Use for rapid regex searches across large monorepos or multi-worktree Git repositories with automatic index building and refresh.
    • Use for integrating fast code search capabilities into coding agents or CLI tools requiring low-latency pattern matching.
    • Use for managing and querying large codebases on local filesystems with configurable indexing, file exclusion, and case sensitivity options.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Trigram-indexed grep with a client/server architecture for fast regex search in large codebases.

    tgrep is integrated into GitHub Copilot CLI to power fast grep searches across large repositories.

    Install tgrep, then start a server:

    Without a server, run tgrep index . to build an on-disk index. Searches use the server when available, then the local index, or scan the filesystem if no usable index exists. Indexes are stored in .tgrep/ by default; add this directory to .gitignore. It is generated build output and must not be committed or distributed with a repository. Build indexes locally for repositories you search; index metadata is not a statement of trust or freshness.

    Indexed file reads stay beneath the selected root and do not follow descendant symlinks or Windows reparse points. Invalid stored paths are rejected; indexes with an unavailable or unrelated recorded root fall back to a filesystem scan. Explicit file arguments and --no-index --follow retain their normal scan semantics.

    Indexes can lag filesystem changes. The server updates asynchronously; without a server, rerun tgrep index . after changes. Use --no-index when a search must read the current files. Queries scan during an initial build until complete coverage is available.

    For coding agents, see AGENTS.md. To install MCP search tools and startup hooks for Codex or pi, run bash install-agent.sh from this checkout (Linux/macOS, Python 3.11+). See the agent integration guide.

    Excerpt from the microsoft/tgrep README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    139+2

    Open issues

    4-1

    Compared with peers in Backend

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    microsoft/tgrep compared with Backend repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    anthropics/skills187.8K+2.9K15—
    DuarteSantos8/openGym19.7K+2.4K602 days ago
    shiyu-coder/Kronos47.0K+2.3K16—
    NationalSecurityAgency/ghidra98.2K+2.3K6414 days ago
    microsoft/VibeVoice56.0K+1.1K29—
    microsoft/tgrep3.5K—485 days ago
    Category median56.0K+2.3K29—

    Also by microsoft

    Other repositories from this maintainer that GStars tracks

    Discover Repositories

    Search across tracked repositories by name or description