Skip to content

Auto-enable ripgrep when available #960

@acoliver

Description

@acoliver

Summary

When ripgrep (rg) is available on the system, automatically enable it by default instead of requiring users to explicitly set useRipgrep: true.

Background

We have two grep implementations:

  • GrepTool (default): Uses git grep → system grep → JS glob fallback chain
  • RipGrepTool: Uses ripgrep (rg) - faster and has better glob support (including brace expansion like *.{ts,tsx})

Currently useRipgrep defaults to false, meaning users who have ripgrep installed don't benefit from it unless they know to enable it.

Proposed Behavior

  1. On startup, check if ripgrep is available (using existing getRipgrepPath() utility)
  2. If available AND user hasn't explicitly set useRipgrep: false, auto-enable it
  3. If user has explicitly disabled it (useRipgrep: false in config), respect that setting
  4. Log at debug level when auto-enabling: "Ripgrep detected, auto-enabling for faster searches"

Implementation Notes

  • The check should be done once at config initialization, not on every search
  • getRipgrepPath() in packages/core/src/utils/ripgrepPathResolver.ts already handles cross-platform detection
  • Need to distinguish between "not set" (auto-detect) vs "explicitly false" (user disabled)

Acceptance Criteria

  • Ripgrep auto-enabled when available and not explicitly disabled
  • User can still disable with explicit useRipgrep: false
  • No startup delay from ripgrep detection (async or cached)
  • Debug log message when auto-enabling

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions