
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
@piotr-oles/pi-reflag
Advanced tools
Pi Agent extension: transparently rewrite grep commands to rg (ripgrep) for faster searches
A pi coding agent extension that transparently rewrites grep commands to rg (ripgrep) and find commands to fd before they execute — faster searches with zero agent behavior change.
pi install npm:@piotr-oles/pi-reflag
Requires rg and fd on $PATH:
brew install ripgrep fd # macOS
apt install ripgrep fd-find # Debian/Ubuntu
Intercepts bash tool calls in the tool_call event. When a command segment starts with grep, find, or xargs grep/xargs find (including piped commands), it translates the arguments to their rg/fd equivalents and rewrites the command in place before execution. The agent never sees the rewrite.
Subshell constructs ($(…), (…)) and commands with variable assignments are left untouched to avoid misinterpreting nested or complex commands.
What gets translated:
| grep flag | rg equivalent |
|---|---|
-r, -R, --recursive | dropped (rg is recursive by default) |
-i, --ignore-case | -i |
-n, --line-number | -n |
-v, --invert-match | -v |
-w, --word-regexp | -w |
-l, --files-with-matches | -l |
-c, --count | -c |
-o, --only-matching | -o |
-E, --extended-regexp | dropped (rg uses ERE by default) |
-G, --basic-regexp | dropped, pattern converted from BRE to ERE |
-F, --fixed-strings | -F |
-P, --perl-regexp | -P |
-A, -B, -C | passed through |
--include=<glob> | -g <glob> |
--exclude=<glob> | -g !<glob> |
--exclude-dir=<dir> | -g !<dir>/ |
-s | --no-messages |
-N (numeric context) | -C N |
What gets translated:
| find expression | fd equivalent |
|---|---|
| (always) | -H added — fd excludes hidden files by default, find doesn't |
| (auto mode) | --no-ignore added when searching inside a known ignored directory |
-name <glob> | -g <glob> |
-iname <glob> | -i -g <glob> |
-name a -o -name b | -g {a,b} (brace expansion) |
! -name <glob> / -not -name <glob> | -E <glob> |
-type f/d/l | -t f/d/l |
-maxdepth N | -d N |
-mindepth N | --min-depth N |
-exec cmd {} \; | -x cmd {} |
-exec cmd {} + | -X cmd {} |
-print0 | -0 |
-print | dropped (fd default) |
-L / -follow | -L |
-path <pat> -prune | -E <pat> (exclude directory) |
-path <pat> | -p <pat> (full-path match) |
-regex <pat> | <pat> (fd regex) |
-iregex <pat> | -i <pat> |
-size <spec> | -S <spec> |
-newer <file> | --newer <file> |
-mtime/-atime/-ctime -N | --changed-within Nd |
-mtime/-atime/-ctime +N | --changed-before Nd |
-mmin/-amin/-cmin -N | --changed-within Nmin |
-mmin/-amin/-cmin +N | --changed-before Nmin |
-user <name> | --owner <name> |
-group <name> | --owner :<name> |
-empty | -t e |
-executable | -t x |
-xdev / -mount | --one-file-system |
-quit | -1 |
Controls when --no-ignore is passed to fd (so it searches inside .gitignored directories):
| Mode | Behaviour |
|---|---|
auto (default) | adds --no-ignore when the search path contains a known ignored directory (e.g. node_modules, .venv, .yarn, dist, target, …) |
no-ignore | always adds --no-ignore |
ignore | never adds --no-ignore |
pi --pi-reflag-ignore-mode=no-ignore
PI_REFLAG_IGNORE_MODE=no-ignore pi
node_modules, .yarn, .pnpm-store, .parcel-cache, .turbo, .vite, .cache, .eslintcache, .stylelintcache, .next, .nuxt, .svelte-kit, .vuepress, .output, .docusaurus, .temp, .serverless, .firebase, dist, build, out, target, debug, obj, artifacts, _deps, CMakeFiles, coverage, .nyc_output, .hypothesis, __pycache__, .pytest_cache, .tox, .nox, .venv, venv, .ipynb_checkpoints, vendor, .bundle, .gradle, .mvn, _build, deps, .git
See exactly how each command was rewritten in the UI:
pi --pi-reflag-verbose
PI_REFLAG_VERBOSE=true pi
pnpm install
pnpm test
pnpm typecheck
pnpm check
To test changes manually:
pi -e packages/pi-reflag/src/index.ts
FAQs
Pi Agent extension: transparently rewrite grep commands to rg (ripgrep) for faster searches
The npm package @piotr-oles/pi-reflag receives a total of 22 weekly downloads. As such, @piotr-oles/pi-reflag popularity was classified as not popular.
We found that @piotr-oles/pi-reflag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.