Dive

Files

workbench__grep

Searches file contents in the project directory with a regular expression.

  • Returns matching lines with their path and line number.
  • Skips gitignored and binary files.
Available toEffect
Workbench agents onlyRead-only

Input

Case-insensitive matching. Default false.

globstring

Only search matching files, e.g. .rs (file name) or src/**/.rs (relative path).

Stop after this many matches. Default 100, cap 500.

pathstring

File or directory to search. Default: the project directory.

patternstringrequired

Rust regex matched against each line.

Output

matchCountinteger
matchesobject[]
truncatedboolean
{
  "matchCount": 1,
  "matches": [
    {
      "line": 42,
      "path": "crates/dive-core/src/tools.rs",
      "text": "pub struct ToolDef {"
    }
  ],
  "truncated": false
}