Agent Recipes¶
Find Python files modified recently¶
rglob find "*.py" --newer-than 7d --json
Grep TODOs with context¶
rglob grep TODO "*.py" --context 2 --exclude .venv --exclude dist --json
Count non-empty Python lines¶
rglob count "*.py" --no-empty --no-comments --json
Find duplicate downloads over 1 MiB¶
rglob dupes "*" --base ~/Downloads --min-size 1MiB
Runnable smoke tests¶
These blocks exercise the same surface against the project's golden
fixture (tests/fixtures/agent-tree/). They run as part of make test
via tests/test_examples.py, so the published recipes can't silently
rot. The fixture path is injected as the $RGLOB_FIXTURE env var.
rglob find "*.py" --base "$RGLOB_FIXTURE" --json
rglob grep TODO "*.py" --base "$RGLOB_FIXTURE" --context 1 --json
rglob schema find
rglob capabilities --json
import os
from pathlib import Path
from rglob.agent import WalkOptions, search_all
fixture = Path(os.environ["RGLOB_FIXTURE"])
result = search_all(WalkOptions(patterns=["*.py"], base=fixture, limit=100))
for match in result.results:
print(match.relative_path)