AI Agent Hub
Back to plugins
🖥️

dsh-tgrep

Client Updated 2026.09.16

Run the following command in DeepSeek Harness:

dsh plugin install huuthuan-nguyen/dsh-tgrep

Paste the following prompt into your AI chat to install this plugin:

Install this plugin in DeepSeek Harness by running dsh plugin install huuthuan-nguyen/dsh-tgrep (source: https://github.com/huuthuan-nguyen/dsh-tgrep).

About this plugin

The grep tool bundled with DeepSeek Harness relies on a packaged ripgrep binary that re-reads and re-scans the entire workspace on every single call. As a repository grows into the tens of thousands of files—or an agent issues searches back to back—the same patterns are matched over and over, and latency climbs in lockstep with tree size and call frequency. dsh-tgrep swaps the engine underneath to Microsoft tgreps trigram-indexed search: once an index is in place, repeated queries are answered straight from the index without walking every file again, delivering roughly a 15x speedup on mid-size repos and up to 52x on very large codebases per Microsofts benchmarks. On first use the plugin automatically spawns a tgrep serve daemon, builds the index in the background, and keeps it warm with a file watcher so subsequent searches and even later sessions hit a hot index. If no index is available, it degrades gracefully to a plain file scan, so a fresh workspace works out of the box. The tool contract stays faithful to the stock grep: the native Web GUI search card, PTC mode, 30-second cooperative timeout, and SearchMeta shape are all preserved, with case_insensitive and max_results added as optional extensions. Shadowing happens on the agent plane only, leaving host presets and the registry entry untouched. The implementation is pure modern ESM with zero runtime dependencies and no build step, and CLI flags are guarded against injection via explicit boundaries.

Use Cases

  • Locating patterns repeatedly in repositories with hundreds of thousands of files
  • Cutting agent search latency when multiple grep calls run back to back
  • Keeping the native Web GUI search card while accelerating the engine underneath

Best For

  • Developers who work with large codebases daily via DeepSeek Harness
  • Engineering teams that need low-latency, agent-driven code search
  • Harness users who prefer zero-dependency, plain-ESM plugin deployments