Docs

Built-in tools›Files and search

Search content

grep
Group
Files and search
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Not reviewed: runs without asking, within the limits on this page.
Profile key
tool.grep.description

Searches file contents with a regular expression and returns each matching line with its file and line number.

Matching ignores case by default and works one line at a time, so a pattern cannot span lines. The syntax has no look-around and no backreferences.

Limits

  • Files over 2 MiB, binary files and links are skipped. Each reported line is cut at 500 characters.
  • A result over 20,000 characters is saved to a file in Mework's app-data folder. The model gets the first 2,000 characters and the file's path.

Good to know

  • It searches what Git would show: tracked files, and untracked files Git does not ignore. Outside a Git repository, dependency and build folders such as node_modules and target are skipped. A single file named as path is always searched.
  • You can change a recorded grep call in the timeline and run it again with Rerun.

Parameters

ParameterTypeDetails
pattern required
Search pattern
stringRegular expression to match against each line.
case_sensitive
Case sensitive
booleanMatch case-sensitively.
Default false
limit
Limit
integerMost matching lines to return.
Default 250
offset
Offset
integerMatching lines to skip first, to fetch the next page.
Default 0
path
Path
stringFile or directory to search, relative to the workspace.
Default "."

Edit this page on GitHub