huuthuan-nguyen/dsh-tgrep ↗★ 2

dsh-tgrep

Shadow built-in grep with Microsoft tgrep (trigram-indexed search) for DeepSeek Harness

Package
dsh-tgrep
Compatibility
Unverified
Version
0.1.13
License
MIT
Last updated
Sep 21, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:huuthuan-nguyen/dsh-tgrep

⚙️ Configuration

When installed, dsh-tgrep contributes a default configuration layer. You can customize settings in your profile's cordis.patch.yml or $DSH_HOME/cordis.patch.yml:

- insert:
    - id: tgrep
      name: dsh-tgrep
      config:
        # Enable or disable the plugin
        enabled: true
        # Prefer connecting to a running tgrep serve instance or local index
        preferServer: true
        # Soft limit on returned matches (model context protection)
        maxLines: 300
        # Extra CLI flags passed to tgrep (e.g. ["--hidden"])
        extraArgs: []
        # Files larger than this are skipped by tgrep. Omitted (the default)
        # means --no-max-filesize, matching grep/ripgrep coverage; set a size
        # such as "64M" or "8M" to cap instead.
        # maxFileSize: "64M"
        # Start a `tgrep serve` daemon for the session workspace when none is
        # running, so no manual `tgrep serve .` is needed per project.
        autoStartDaemon: true
        # How long a search waits for a freshly spawned daemon to bind before
        # proceeding anyway (it scans meanwhile, so the call never fails).
        daemonReadyTimeoutMs: 5000
        # Stop the daemon this plugin started when the harness exits, so it does
        # not linger as an orphan. Set false to keep it warm across sessions.
        stopDaemonOnExit: true
        # Stop an idle daemon after this many milliseconds without a search
        # (default 30 minutes; 0 disables). Every search resets the deadline.
        daemonIdleTimeoutMs: 1800000
        # Extra flags for the `tgrep serve` daemon. `extraArgs` above belongs to
        # searches, so this is the only way to configure the daemon itself.
        #   ["--exclude", "data"]                        skip a directory when indexing
        #   ["--watch-mode", "poll", "--poll-interval", "300"]  cheaper refresh
        #   ["--no-watch"]                               index once, never refresh
        daemonArgs: []