AGPL-3.0-or-later · forever.

the standard library

nika:grep

Recursive regex search · returns {path,line,match} sorted by (path,line). One of 28 builtins in the closed nika: namespace: workspace files: read, write, search (permits.fs-gated).

  • filefamily5 tools
  • 3argsdeclared contract
  • 1requiredcheck teaches a miss
  • craftedusage filecheck-green below

the contract

3 args · 1 required

A missing required arg is a nika check finding before anything runs; the vocabulary below comes from the binary itself (nika catalog --tools --json), not from prose.

pattern*
stringRE2-class regex
path
stringroot to search (default .)
case_insensitive
boolean

in a real file

a complete workflow
grep.nika.yaml
nika: v1workflow:  id: count-the-todos  description: "recursive regex search — {path, line, match}, sorted"tasks:  todos:    invoke:      tool: "nika:grep"      args:        pattern: "TODO|FIXME"        path: "./src"  lines:    with:      todos: ${{ tasks.todos.output }}    invoke:      tool: "nika:jq"      args:        input: ${{ with.todos }}        expression: "map(.path) | join(\"\\n\")"  tally:    with:      hits: ${{ tasks.lines.output }}    exec:      command: ["wc", "-l"]      stdin: "${{ with.hits }}"outputs:  count: ${{ tasks.tally.output }}

a complete file, nika check green; the drift gate re-validates this copy against the schema on every test run. open it in the playground →

cross-references

ships in skeletons

no skeleton ships it; the crafted file above is the reference.

the check gates

the file family

5 tools

workspace files: read, write, search (permits.fs-gated).

Machines read the same vocabulary at /tools/catalog.json; the contract lives in spec 06 · stdlib. Install and ask the binary itself: nika catalog --tools. Read the spec →