grep
verbreadFind lines that hold a text in files of a store, within a limit of files and bytes.
Program anyfs-writer. Origin anyfs.
Governance: the action
What the verb is and may do, as governance says it. Each annotation is expressed by the surfaces or says why it is not.
| Property | Value |
|---|---|
kind | report |
effect | read |
idempotent | true |
audience | both |
tier | reader |
dryRun | false |
check | false |
reachChannels | local, ssh, mcp, rest |
reachReadOnly | true |
reachNeedsTty | false |
reachRunsAs | caller |
reachConfirmation | none |
Operands
| Operand | Meaning |
|---|---|
TEXT | The text to look for, as it is written: not a pattern. |
LOCATION | Files or directories (with -r) to look in. |
Options
| Option | Meaning | Properties |
|---|---|---|
--ignore-case | Ignore the case of letters. | type=flag, short=i, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--line-number | Write the number of each line. | type=flag, short=n, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--files-with-matches | Only the names of files that hold the text. | type=flag, short=l, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--count | Only how many lines each file holds. | type=flag, short=c, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--recursive | Go into directories. | type=flag, short=r, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--max-files | Look in at most N files (10000 by default). | type=value, required=false, standard=false, humanOnly=false, valueName=N, default=10000 |
--max-bytes | Skip files larger than N bytes (8 MiB by default). | type=value, required=false, standard=false, humanOnly=false, valueName=N, default=8388608 |
--explain | Say how the store would carry the operation out (native, emulated or refused), and do nothing else. | type=flag, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--strict | Stop where the store carries an operation out by a means that can lose or change what you meant. | type=flag, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--json | Write one JSON document and nothing else for a person. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--sarif | Write the findings as SARIF 2.1.0 and nothing else. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--quiet | Show only how it ended. | type=flag, short=q, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--verbose | Show every step as it happens. | type=flag, short=v, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--color | Use colour where the terminal shows it (--no-color turns it off). | type=flag, required=false, standard=true, humanOnly=false, negatable=true, default=true |
--non-interactive | Never ask a question: where one is needed, fail and say so. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--on | Run it on these targets instead of here: ids joined by commas, `class:<class>` or `all`. | type=value, required=false, standard=true, humanOnly=false, valueName=VALUE |
Examples
anyfs grep -rn ssh-ed25519 fleet:/keys # Every line below keys that holds ssh-ed25519, with its number.Physical: what it is drawn as
anyfs grep
cli-command. Find lines that hold a text in files of a store, within a limit of files and bytes.
| Property | Value |
|---|---|
usage | anyfs grep |
words | grep |
tier | reader |
anyfs_grep
mcp-tool. Find lines that hold a text in files of a store, within a limit of files and bytes. (report, effect read, safe to repeat.)
| Property | Value |
|---|---|
title | anyfs grep |
toolName | anyfs_grep |
readOnlyHint | true |
destructiveHint | false |
idempotentHint | true |
inputs | ignoreCase, lineNumber, filesWithMatches, count, recursive, maxFiles, maxBytes, explain, strict, TEXT, LOCATION |
required | TEXT, LOCATION |
tier | reader |
GET /v1/grep
rest-route. Find lines that hold a text in files of a store, within a limit of files and bytes.
| Property | Value |
|---|---|
method | GET |
path | /v1/grep |
operationId | anyfs_grep |
effect | read |
tier | reader |
idempotent | true |