rlmgrep 0.1.28__tar.gz → 0.1.31__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rlmgrep
3
- Version: 0.1.28
3
+ Version: 0.1.31
4
4
  Summary: Grep-shaped CLI search powered by DSPy RLM
5
5
  Author: rlmgrep
6
6
  License: MIT
@@ -100,8 +100,7 @@ Common options:
100
100
  - `--no-recursive` do not recurse directories
101
101
  - `-a`, `--text` treat binary files as text
102
102
  - `-y`, `--yes` skip file count confirmation
103
- - `--files-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
104
- - `--files-from-rg` alias for `--files-from-stdin`
103
+ - `--paths-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
105
104
  - `--model`, `--sub-model` override model names
106
105
  - `--api-key`, `--api-base`, `--model-type` override provider settings
107
106
  - `--max-iterations`, `--max-llm-calls` cap RLM search effort
@@ -123,7 +122,7 @@ rlmgrep "How do we map external API errors into internal error codes?" -g "**/*.
123
122
  cat README.md | rlmgrep --answer "What is this tool for and how is it used?"
124
123
 
125
124
  # Use rg/grep to find candidate files, then rlmgrep over that list
126
- rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token control and where is it validated?"
125
+ rg -l "token" . | rlmgrep --paths-from-stdin --answer "What does this token control and where is it validated?"
127
126
  ```
128
127
 
129
128
  ## Input selection
@@ -133,8 +132,8 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
133
132
  - `--type` uses built-in type mappings (e.g., `py`, `js`, `md`); unknown values are treated as file extensions.
134
133
  - `-g/--glob` matches path globs against normalized paths (forward slashes).
135
134
  - Paths are printed relative to the current working directory when possible.
136
- - If no paths are provided, rlmgrep reads from stdin and uses the synthetic path `<stdin>`; if stdin is empty, it exits with code 2.
137
- - rlmgrep asks for confirmation when more than 200 files would be loaded (use `-y/--yes` to skip), and aborts when more than 1000 files would be loaded.
135
+ - If no paths are provided and stdin is a TTY, rlmgrep defaults to `.`. If stdin is piped, it reads from stdin and uses the synthetic path `<stdin>`.
136
+ - rlmgrep asks for confirmation when more than 1000 files would be loaded (use `-y/--yes` to skip), and aborts when more than 5000 files would be loaded.
138
137
 
139
138
  ## Output contract (stable for agents)
140
139
 
@@ -179,8 +178,8 @@ temperature = 1.0
179
178
  max_tokens = 64000
180
179
  max_iterations = 10
181
180
  max_llm_calls = 20
182
- file_warn_threshold = 200
183
- file_hard_max = 1000
181
+ file_warn_threshold = 1000
182
+ file_hard_max = 5000
184
183
  # markitdown_enable_images = false
185
184
  # markitdown_image_llm_model = "gpt-5-mini"
186
185
  # markitdown_image_llm_provider = "openai"
@@ -86,8 +86,7 @@ Common options:
86
86
  - `--no-recursive` do not recurse directories
87
87
  - `-a`, `--text` treat binary files as text
88
88
  - `-y`, `--yes` skip file count confirmation
89
- - `--files-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
90
- - `--files-from-rg` alias for `--files-from-stdin`
89
+ - `--paths-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
91
90
  - `--model`, `--sub-model` override model names
92
91
  - `--api-key`, `--api-base`, `--model-type` override provider settings
93
92
  - `--max-iterations`, `--max-llm-calls` cap RLM search effort
@@ -109,7 +108,7 @@ rlmgrep "How do we map external API errors into internal error codes?" -g "**/*.
109
108
  cat README.md | rlmgrep --answer "What is this tool for and how is it used?"
110
109
 
111
110
  # Use rg/grep to find candidate files, then rlmgrep over that list
112
- rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token control and where is it validated?"
111
+ rg -l "token" . | rlmgrep --paths-from-stdin --answer "What does this token control and where is it validated?"
113
112
  ```
114
113
 
115
114
  ## Input selection
@@ -119,8 +118,8 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
119
118
  - `--type` uses built-in type mappings (e.g., `py`, `js`, `md`); unknown values are treated as file extensions.
120
119
  - `-g/--glob` matches path globs against normalized paths (forward slashes).
121
120
  - Paths are printed relative to the current working directory when possible.
122
- - If no paths are provided, rlmgrep reads from stdin and uses the synthetic path `<stdin>`; if stdin is empty, it exits with code 2.
123
- - rlmgrep asks for confirmation when more than 200 files would be loaded (use `-y/--yes` to skip), and aborts when more than 1000 files would be loaded.
121
+ - If no paths are provided and stdin is a TTY, rlmgrep defaults to `.`. If stdin is piped, it reads from stdin and uses the synthetic path `<stdin>`.
122
+ - rlmgrep asks for confirmation when more than 1000 files would be loaded (use `-y/--yes` to skip), and aborts when more than 5000 files would be loaded.
124
123
 
125
124
  ## Output contract (stable for agents)
126
125
 
@@ -165,8 +164,8 @@ temperature = 1.0
165
164
  max_tokens = 64000
166
165
  max_iterations = 10
167
166
  max_llm_calls = 20
168
- file_warn_threshold = 200
169
- file_hard_max = 1000
167
+ file_warn_threshold = 1000
168
+ file_hard_max = 5000
170
169
  # markitdown_enable_images = false
171
170
  # markitdown_image_llm_model = "gpt-5-mini"
172
171
  # markitdown_image_llm_provider = "openai"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rlmgrep"
3
- version = "0.1.28"
3
+ version = "0.1.31"
4
4
  description = "Grep-shaped CLI search powered by DSPy RLM"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.1.28"
2
+ __version__ = "0.1.31"
@@ -186,23 +186,11 @@ def _parse_args(argv: list[str]) -> argparse.Namespace:
186
186
  parser.add_argument("--answer", action="store_true", help="Print a narrative answer before grep output")
187
187
  parser.add_argument("-y", "--yes", action="store_true", help="Skip file count confirmation")
188
188
  parser.add_argument(
189
- "--files-from-stdin",
190
- dest="stdin_files",
189
+ "--paths-from-stdin",
190
+ dest="stdin_paths",
191
191
  action="store_true",
192
192
  help="Treat stdin as newline-delimited file paths (e.g., rg -l)",
193
193
  )
194
- parser.add_argument(
195
- "--files-from-rg",
196
- dest="stdin_files",
197
- action="store_true",
198
- help="Alias for --files-from-stdin",
199
- )
200
- parser.add_argument(
201
- "--stdin-files",
202
- dest="stdin_files",
203
- action="store_true",
204
- help="Deprecated: use --files-from-stdin",
205
- )
206
194
 
207
195
  parser.add_argument("-g", "--glob", dest="globs", action="append", default=[], help="Include files matching glob (may repeat)")
208
196
  parser.add_argument("--type", dest="types", action="append", default=[], help="Include file types (py, js, md, etc.). May repeat")
@@ -559,7 +547,7 @@ def main(argv: list[str] | None = None) -> int:
559
547
  stdin_text: str | None = None
560
548
  if args.paths:
561
549
  input_paths = list(args.paths)
562
- elif args.stdin_files:
550
+ elif args.stdin_paths:
563
551
  if sys.stdin.isatty():
564
552
  _warn("no input paths and stdin is empty")
565
553
  return 2
@@ -582,9 +570,9 @@ def main(argv: list[str] | None = None) -> int:
582
570
  warnings: list[str] = []
583
571
  else:
584
572
  warn_threshold = _parse_num(
585
- _pick(None, config, "file_warn_threshold", 200), int
573
+ _pick(None, config, "file_warn_threshold", 1000), int
586
574
  )
587
- hard_max = _parse_num(_pick(None, config, "file_hard_max", 1000), int)
575
+ hard_max = _parse_num(_pick(None, config, "file_hard_max", 5000), int)
588
576
  if warn_threshold is not None and warn_threshold <= 0:
589
577
  warn_threshold = None
590
578
  if hard_max is not None and hard_max <= 0:
@@ -16,8 +16,8 @@ DEFAULT_CONFIG_TEXT = "\n".join(
16
16
  "max_tokens = 64000",
17
17
  "max_iterations = 10",
18
18
  "max_llm_calls = 20",
19
- "file_warn_threshold = 200",
20
- "file_hard_max = 1000",
19
+ "file_warn_threshold = 1000",
20
+ "file_hard_max = 5000",
21
21
  "# markitdown_enable_images = false",
22
22
  "# markitdown_image_llm_model = \"gpt-5-mini\"",
23
23
  "# markitdown_image_llm_provider = \"openai\"",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rlmgrep
3
- Version: 0.1.28
3
+ Version: 0.1.31
4
4
  Summary: Grep-shaped CLI search powered by DSPy RLM
5
5
  Author: rlmgrep
6
6
  License: MIT
@@ -100,8 +100,7 @@ Common options:
100
100
  - `--no-recursive` do not recurse directories
101
101
  - `-a`, `--text` treat binary files as text
102
102
  - `-y`, `--yes` skip file count confirmation
103
- - `--files-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
104
- - `--files-from-rg` alias for `--files-from-stdin`
103
+ - `--paths-from-stdin` treat stdin as newline-delimited file paths (e.g., `rg -l`)
105
104
  - `--model`, `--sub-model` override model names
106
105
  - `--api-key`, `--api-base`, `--model-type` override provider settings
107
106
  - `--max-iterations`, `--max-llm-calls` cap RLM search effort
@@ -123,7 +122,7 @@ rlmgrep "How do we map external API errors into internal error codes?" -g "**/*.
123
122
  cat README.md | rlmgrep --answer "What is this tool for and how is it used?"
124
123
 
125
124
  # Use rg/grep to find candidate files, then rlmgrep over that list
126
- rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token control and where is it validated?"
125
+ rg -l "token" . | rlmgrep --paths-from-stdin --answer "What does this token control and where is it validated?"
127
126
  ```
128
127
 
129
128
  ## Input selection
@@ -133,8 +132,8 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
133
132
  - `--type` uses built-in type mappings (e.g., `py`, `js`, `md`); unknown values are treated as file extensions.
134
133
  - `-g/--glob` matches path globs against normalized paths (forward slashes).
135
134
  - Paths are printed relative to the current working directory when possible.
136
- - If no paths are provided, rlmgrep reads from stdin and uses the synthetic path `<stdin>`; if stdin is empty, it exits with code 2.
137
- - rlmgrep asks for confirmation when more than 200 files would be loaded (use `-y/--yes` to skip), and aborts when more than 1000 files would be loaded.
135
+ - If no paths are provided and stdin is a TTY, rlmgrep defaults to `.`. If stdin is piped, it reads from stdin and uses the synthetic path `<stdin>`.
136
+ - rlmgrep asks for confirmation when more than 1000 files would be loaded (use `-y/--yes` to skip), and aborts when more than 5000 files would be loaded.
138
137
 
139
138
  ## Output contract (stable for agents)
140
139
 
@@ -179,8 +178,8 @@ temperature = 1.0
179
178
  max_tokens = 64000
180
179
  max_iterations = 10
181
180
  max_llm_calls = 20
182
- file_warn_threshold = 200
183
- file_hard_max = 1000
181
+ file_warn_threshold = 1000
182
+ file_hard_max = 5000
184
183
  # markitdown_enable_images = false
185
184
  # markitdown_image_llm_model = "gpt-5-mini"
186
185
  # markitdown_image_llm_provider = "openai"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes