rlmgrep 0.1.5__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rlmgrep/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.1.5"
2
+ __version__ = "0.1.7"
rlmgrep/cli.py CHANGED
@@ -84,10 +84,22 @@ def _parse_args(argv: list[str]) -> argparse.Namespace:
84
84
  parser.add_argument("-a", "--text", dest="binary_as_text", action="store_true", help="Search binary files as text")
85
85
  parser.add_argument("--answer", action="store_true", help="Print a narrative answer before grep output")
86
86
  parser.add_argument("-y", "--yes", action="store_true", help="Skip file count confirmation")
87
+ parser.add_argument(
88
+ "--files-from-stdin",
89
+ action="store_true",
90
+ help="Treat stdin as newline-delimited file paths (e.g., rg -l)",
91
+ )
92
+ parser.add_argument(
93
+ "--files-from-rg",
94
+ dest="stdin_files",
95
+ action="store_true",
96
+ help="Alias for --files-from-stdin",
97
+ )
87
98
  parser.add_argument(
88
99
  "--stdin-files",
100
+ dest="stdin_files",
89
101
  action="store_true",
90
- help="Treat stdin as newline-delimited file paths",
102
+ help="Deprecated: use --files-from-stdin",
91
103
  )
92
104
 
93
105
  parser.add_argument("-g", "--glob", dest="globs", action="append", default=[], help="Include files matching glob (may repeat)")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rlmgrep
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Grep-shaped CLI search powered by DSPy RLM
5
5
  Author: rlmgrep
6
6
  License: MIT
@@ -61,7 +61,6 @@ rlmgrep [options] "query" [paths...]
61
61
 
62
62
  Common options:
63
63
 
64
- - `-n` show line numbers (default)
65
64
  - `-C N` context lines before/after (grep-style)
66
65
  - `-A N` context lines after
67
66
  - `-B N` context lines before
@@ -71,7 +70,8 @@ Common options:
71
70
  - `--no-recursive` do not recurse directories
72
71
  - `-a`, `--text` treat binary files as text
73
72
  - `-y`, `--yes` skip file count confirmation
74
- - `--stdin-files` treat stdin as newline-delimited file paths
73
+ - `--files-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
74
+ - `--files-from-rg` alias for `--files-from-stdin`
75
75
  - `--model`, `--sub-model` override model names
76
76
  - `--api-key`, `--api-base`, `--model-type` override provider settings
77
77
  - `--max-iterations`, `--max-llm-calls` cap RLM search effort
@@ -81,19 +81,19 @@ Examples:
81
81
 
82
82
  ```sh
83
83
  # Natural-language query over a repo
84
- rlmgrep -n -C 2 "token parsing" rlmgrep/
84
+ rlmgrep -n -C 2 "Where is retry/backoff configured and what are the defaults?" .
85
85
 
86
86
  # Restrict to Python files
87
- rlmgrep "where config is read" --type py rlmgrep/
87
+ rlmgrep "Where do we parse JWTs and enforce expiration?" --type py .
88
88
 
89
89
  # Glob filters (repeatable or comma-separated)
90
- rlmgrep "error handling" -g "**/*.py" -g "**/*.md" .
90
+ rlmgrep "How do we map external API errors into internal error codes?" -g "**/*.py" -g "**/*.ts" .
91
91
 
92
- # Read from stdin (only when no paths are provided)
93
- cat README.md | rlmgrep "install"
92
+ # Single-file semantic question (when you already have the file)
93
+ cat README.md | rlmgrep --answer "What is this tool for and how is it used?"
94
94
 
95
95
  # Use rg/grep to find candidate files, then rlmgrep over that list
96
- rg -l "token" . | rlmgrep --stdin-files --answer "what does this token control?"
96
+ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token control and where is it validated?"
97
97
  ```
98
98
 
99
99
  ## Input selection
@@ -118,7 +118,6 @@ rg -l "token" . | rlmgrep --stdin-files --answer "what does this token control?"
118
118
  - `1` = no matches
119
119
  - `2` = usage/config/error
120
120
 
121
- Agent tip: use `-n` and no context for parse-friendly output, then key off exit codes.
122
121
 
123
122
  ## Regex-style queries (best effort)
124
123
 
@@ -182,18 +181,16 @@ If more than one provider key is set and the model does not make the provider ob
182
181
  - Converted image/audio text is cached in sidecar files named `<original>.<ext>.md` next to the original file and reused on subsequent runs.
183
182
  - Use `-a/--text` to force binary files to be read as text (UTF-8 with replacement).
184
183
 
185
- ## Agent usage notes
184
+ ## Skill (Anthropic-style)
185
+
186
+ A ready-to-copy skill lives in:
187
+
188
+ - `skills/rlmgrep-usage/SKILL.md`
189
+
190
+ Install it by copying the folder into your agent’s skills directory (for example, `~/.claude/skills/rlmgrep-usage/`), then invoke it as `$rlmgrep-usage` in prompts. This is a lightweight, documentation-only skill meant to guide when to use rlmgrep vs `rg`/`grep`.
186
191
 
187
- - Prefer narrow corpora (globs/types) to reduce token usage.
188
- - Use `--max-llm-calls` to cap costs; combine with small `--max-iterations` for safety.
189
- - For reproducible parsing, use `-n` and avoid context (`-C/-A/-B`).
190
-
191
192
  ## Development
192
193
 
193
194
  - Install locally: `pip install -e .` or `uv tool install .`
194
195
  - Run: `rlmgrep "query" .`
195
196
  - No test suite is configured yet.
196
-
197
- ## Security
198
-
199
- Do not commit API keys. Use environment variables or `~/.rlmgrep/config.toml`.
@@ -1,14 +1,14 @@
1
- rlmgrep/__init__.py,sha256=nkO5AhSYqNqN7gEHOfOJe6qbc5OMva0ggSpwLNV5QR8,48
1
+ rlmgrep/__init__.py,sha256=-w_IYq2qirUd-aSQcHEODBy3Q_jqwhPRWywcT_M1mMc,48
2
2
  rlmgrep/__main__.py,sha256=MHKZ_ae3fSLGTLUUMOx15fWdeOnJSHhq-zslRP5F5Lc,79
3
- rlmgrep/cli.py,sha256=qCN6Nvepb-HvpbvCSp-NAyThuZbML6k89ndzAqlg_-I,20246
3
+ rlmgrep/cli.py,sha256=eUdM9aC0znZFzjqj-4YmT0_ymisSc_lUwDVjRi4ZU-s,20589
4
4
  rlmgrep/config.py,sha256=u1iz-nI8dj-dZETbpIki3RQefHJEyi5oE5zE4_IR8kg,2399
5
5
  rlmgrep/file_map.py,sha256=x2Ri1wzK8_87GUorsAV01K_nYLZcv30yIquDeTCcdEw,876
6
6
  rlmgrep/ingest.py,sha256=uCz2el9B-RIT9umFo-gFEdAsmWPP1IJOArFFQY0D_1A,9127
7
7
  rlmgrep/interpreter.py,sha256=s_nMRxLlAU9C0JmUzUBW5NbVbuH67doVWF54K54STlA,2478
8
8
  rlmgrep/render.py,sha256=OYZy7BuJJe-KsDhEGAz6JA5RGd65ZInPWf9wLDJE0ag,3554
9
9
  rlmgrep/rlm.py,sha256=i3rCTp8OABByF60Un5gO7265gaW4spwU0OFKIz4surg,5750
10
- rlmgrep-0.1.5.dist-info/METADATA,sha256=aY7Fy6DgS7lmtxFzmt79ry2PebKB43744ncjlT9mZHM,6584
11
- rlmgrep-0.1.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
12
- rlmgrep-0.1.5.dist-info/entry_points.txt,sha256=UV6QkEbkwBO1JJ53mm84_n35tVyOczPvOQ14ga7vrCI,45
13
- rlmgrep-0.1.5.dist-info/top_level.txt,sha256=gTujSRsO58c80eN7aRH2cfe51FHxx8LJ1w1Y2YlHti0,8
14
- rlmgrep-0.1.5.dist-info/RECORD,,
10
+ rlmgrep-0.1.7.dist-info/METADATA,sha256=Rq6XsCDbifQcXrvTGWAYvwbIFBlNDJ0jn0gdDpOYplQ,6753
11
+ rlmgrep-0.1.7.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
12
+ rlmgrep-0.1.7.dist-info/entry_points.txt,sha256=UV6QkEbkwBO1JJ53mm84_n35tVyOczPvOQ14ga7vrCI,45
13
+ rlmgrep-0.1.7.dist-info/top_level.txt,sha256=gTujSRsO58c80eN7aRH2cfe51FHxx8LJ1w1Y2YlHti0,8
14
+ rlmgrep-0.1.7.dist-info/RECORD,,