Ripgrep
Gives the agent a ripgrep tool for regex (or literal) search across workspace files, so it does not need find / grep via the shell.
Requirement: rg must be on PATH (rg --version). If it is missing, the plugin logs an error and does not register the tool.
Configuration
plugins:
- module: codumentor.plugins.ripgrep
class: RipgrepPlugin
args:
enabled: true
max_results: 1000 # default 1000
max_result_length: 30000 # bytes; default 30000
max_filesize: "2M" # default "2M"; "" searches every file
timeout_seconds: 30 # default 30
- enabled (optional, default
true). - max_results (optional, default
1000): Default cap on output lines per search, in total across all files. The search stops once it has this many, and the result says it was cut. The agent can override per call (1–10000). - max_result_length (optional, default
30000): Truncate the returned text after this many bytes. - max_filesize (optional, default
"2M"): Files larger than this are not searched (rg --max-filesizesyntax). Binary files are always skipped, and lines longer than 500 characters are shown as a preview. - timeout_seconds (optional, default
30): A search still running after this is killed, with every process it started.
There is no target_agents setting; both the main agent and subagents can use the tool.
Tool: ripgrep
| Argument | Required | Default | Description |
|---|---|---|---|
pattern | yes | — | Regex (or literal text). |
search_dir | no | "." | Directory relative to the workspace. Multi-repo: "repo_name" or "repo_name/subdir". Single-repo: a path under the working directory. Omit or "." to search everything. |
file_types | no | — | Glob or list of globs, e.g. ".py" or [".js", "*.ts"]. |
files_only | no | false | If true, return matching file paths only (like grep -l). |
case_sensitive | no | true | Set false for case-insensitive search. |
max_results | no | plugin default | Per-call cap (1–10000). |
Searches stay inside the workspace. With workspace isolation enabled, they run in the conversation sandbox. A search times out after timeout_seconds (30 by default).
Notes
- If the tool does not appear: confirm
rg --version, that the plugin is enabled, and check logs for "ripgrep not found". - Empty results: check the regex,
search_dir, file-type filter, and case sensitivity. - To keep output small, lower
max_results, filterfile_types, or setfiles_only: true.