omp packages

@ladbabynpm/picc-grep0.1.1

Claude Code style Grep (content search) tool for pi — a faithful port backed by ripgrep.

ladbabynpm Published 20 days ago MIT ~332 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

picc-grep

npm downloads

Claude Code style Grep (content search) tool for pi — a faithful port of Claude Code's Grep tool, backed by ripgrep.

Part of picc, a pi agent setup mirroring Claude Code's harness.

pi's built-in grep always uses --json content mode, has no output modes and no multiline support. This extension replicates Claude Code's Grep exactly: three output modes, rich flags, and head_limit/offset pagination.

Usage

Install via pi install npm:@ladbabynpm/picc-grep.

Tool

  • Name: grep (default) or Grep — configurable (see below).
  • Parameters: pattern (required), plus path, glob, type, output_mode (content | files_with_matches (default) | count), -A, -B, -C, context, -n, -i, -o, head_limit, offset, multiline.
  • Behavior: exact Claude Code arg order (--hidden, VCS-dir excludes, --max-columns 500, mode flags, pattern, --type, --glob), per-mode result templates, path relativization against cwd, and head_limit (default 250, 0 = unlimited) + offset pagination.
  • The -o (only-matching) parameter is a deliberate extension: it is in the local Grep_schema.json but not in Claude Code's live source. In content mode it maps to rg -o / --only-matching.
  • Requires rg (ripgrep) on PATH.

Configuration

Setting Where Values Default
toolName config.json "grep" | "Grep" "grep"
PICC_GREP_TOOL_NAME env "grep" | "Grep" —
PICC_GREP_CONFIG_PATH env absolute path to a config.json sibling of index.ts

Precedence for the tool name: PICC_GREP_TOOL_NAME env > config.json > "grep".

config.json is read from ~/.pi/agent/extensions/picc-grep/config.json by default.

{ "toolName": "grep" }

Development

  • npm run lint — biome check
  • npm run lint:fix — biome check --write
  • npm run typecheck — tsc --noEmit

No any; top-level imports only; strict TypeScript (ES2022, bundler resolution). Dependencies beyond node:* are limited to typebox and @earendil-works/pi-coding-agent (both bundled with pi).