rlmgrep 0.1.8__tar.gz → 0.1.10__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.8
3
+ Version: 0.1.10
4
4
  Summary: Grep-shaped CLI search powered by DSPy RLM
5
5
  Author: rlmgrep
6
6
  License: MIT
@@ -22,7 +22,8 @@ uv tool install rlmgrep
22
22
  # uv tool install git+https://github.com/halfprice06/rlmgrep.git
23
23
 
24
24
  export OPENAI_API_KEY=... # or set keys in ~/.rlmgrep
25
- rlmgrep "where are API keys read" rlmgrep/
25
+ rlmgrep --answer "What does this repo do and where are the entry points?" .
26
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
26
27
  ```
27
28
 
28
29
  ## Requirements
@@ -75,6 +76,7 @@ rlmgrep [options] "query" [paths...]
75
76
 
76
77
  Common options:
77
78
 
79
+ - `--answer` return a narrative answer before the grep output
78
80
  - `-C N` context lines before/after (grep-style)
79
81
  - `-A N` context lines after
80
82
  - `-B N` context lines before
@@ -95,7 +97,7 @@ Examples:
95
97
 
96
98
  ```sh
97
99
  # Natural-language query over a repo
98
- rlmgrep -n -C 2 "Where is retry/backoff configured and what are the defaults?" .
100
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
99
101
 
100
102
  # Restrict to Python files
101
103
  rlmgrep "Where do we parse JWTs and enforce expiration?" --type py .
@@ -125,7 +127,7 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
125
127
  - Output uses rg-style headings by default:
126
128
  - A file header line like `./path/to/file`
127
129
  - Then `line:\ttext` for matches, `line-\ttext` for context lines
128
- - Line numbers are 1-based.
130
+ - Line numbers are always included and are 1-based.
129
131
  - When context ranges are disjoint, a `--` line separates groups.
130
132
  - Exit codes:
131
133
  - `0` = at least one match
@@ -140,7 +142,7 @@ rlmgrep can interpret traditional regex-style patterns inside a natural-language
140
142
  Example (best-effort regex semantics + extra context):
141
143
 
142
144
  ```sh
143
- rlmgrep -n "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
145
+ rlmgrep "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
144
146
  ```
145
147
 
146
148
  If you need strict, deterministic regex behavior, use `rg`/`grep`.
@@ -10,7 +10,8 @@ uv tool install rlmgrep
10
10
  # uv tool install git+https://github.com/halfprice06/rlmgrep.git
11
11
 
12
12
  export OPENAI_API_KEY=... # or set keys in ~/.rlmgrep
13
- rlmgrep "where are API keys read" rlmgrep/
13
+ rlmgrep --answer "What does this repo do and where are the entry points?" .
14
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
14
15
  ```
15
16
 
16
17
  ## Requirements
@@ -63,6 +64,7 @@ rlmgrep [options] "query" [paths...]
63
64
 
64
65
  Common options:
65
66
 
67
+ - `--answer` return a narrative answer before the grep output
66
68
  - `-C N` context lines before/after (grep-style)
67
69
  - `-A N` context lines after
68
70
  - `-B N` context lines before
@@ -83,7 +85,7 @@ Examples:
83
85
 
84
86
  ```sh
85
87
  # Natural-language query over a repo
86
- rlmgrep -n -C 2 "Where is retry/backoff configured and what are the defaults?" .
88
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
87
89
 
88
90
  # Restrict to Python files
89
91
  rlmgrep "Where do we parse JWTs and enforce expiration?" --type py .
@@ -113,7 +115,7 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
113
115
  - Output uses rg-style headings by default:
114
116
  - A file header line like `./path/to/file`
115
117
  - Then `line:\ttext` for matches, `line-\ttext` for context lines
116
- - Line numbers are 1-based.
118
+ - Line numbers are always included and are 1-based.
117
119
  - When context ranges are disjoint, a `--` line separates groups.
118
120
  - Exit codes:
119
121
  - `0` = at least one match
@@ -128,7 +130,7 @@ rlmgrep can interpret traditional regex-style patterns inside a natural-language
128
130
  Example (best-effort regex semantics + extra context):
129
131
 
130
132
  ```sh
131
- rlmgrep -n "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
133
+ rlmgrep "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
132
134
  ```
133
135
 
134
136
  If you need strict, deterministic regex behavior, use `rg`/`grep`.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rlmgrep"
3
- version = "0.1.8"
3
+ version = "0.1.10"
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.8"
2
+ __version__ = "0.1.10"
@@ -72,10 +72,9 @@ def _parse_args(argv: list[str]) -> argparse.Namespace:
72
72
  parser.add_argument("pattern", nargs="?", help="Query string (interpreted by RLM)")
73
73
  parser.add_argument("paths", nargs="*", help="Files or directories")
74
74
 
75
- parser.add_argument("-n", dest="line_numbers", action="store_true", help="Show line numbers (default)")
76
75
  parser.add_argument("-r", dest="recursive", action="store_true", help="Recursive (directories are searched recursively by default)")
77
76
  parser.add_argument("--no-recursive", dest="recursive", action="store_false", help="Do not recurse directories")
78
- parser.set_defaults(recursive=True, line_numbers=True)
77
+ parser.set_defaults(recursive=True)
79
78
 
80
79
  parser.add_argument("-C", dest="context", type=int, default=0, help="Context lines before/after")
81
80
  parser.add_argument("-A", dest="after", type=int, default=None, help="Context lines after")
@@ -565,7 +564,6 @@ def main(argv: list[str] | None = None) -> int:
565
564
  output_lines = render_matches(
566
565
  files=files,
567
566
  matches=verified,
568
- show_line_numbers=args.line_numbers,
569
567
  before=before,
570
568
  after=after,
571
569
  use_color=use_color,
@@ -23,13 +23,10 @@ def _format_line(
23
23
  line_no: int,
24
24
  text: str,
25
25
  is_match: bool,
26
- show_line_numbers: bool,
27
26
  use_color: bool,
28
27
  heading: bool,
29
28
  ) -> str:
30
29
  delim = ":" if is_match else "-"
31
- if not show_line_numbers:
32
- return text
33
30
  prefix = _colorize(str(line_no), COLOR_LINE_NO, use_color)
34
31
  sep = "\t" if heading else ""
35
32
  return f"{prefix}{delim}{sep}{text}"
@@ -52,7 +49,6 @@ def _merge_ranges(ranges: list[tuple[int, int]]) -> list[tuple[int, int]]:
52
49
  def render_matches(
53
50
  files: dict[str, FileRecord],
54
51
  matches: dict[str, list[int]],
55
- show_line_numbers: bool,
56
52
  before: int,
57
53
  after: int,
58
54
  use_color: bool = False,
@@ -86,7 +82,6 @@ def render_matches(
86
82
  line_no,
87
83
  text,
88
84
  True,
89
- show_line_numbers,
90
85
  use_color,
91
86
  heading,
92
87
  )
@@ -111,7 +106,6 @@ def render_matches(
111
106
  line_no,
112
107
  text,
113
108
  is_match,
114
- show_line_numbers,
115
109
  use_color,
116
110
  heading,
117
111
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rlmgrep
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: Grep-shaped CLI search powered by DSPy RLM
5
5
  Author: rlmgrep
6
6
  License: MIT
@@ -22,7 +22,8 @@ uv tool install rlmgrep
22
22
  # uv tool install git+https://github.com/halfprice06/rlmgrep.git
23
23
 
24
24
  export OPENAI_API_KEY=... # or set keys in ~/.rlmgrep
25
- rlmgrep "where are API keys read" rlmgrep/
25
+ rlmgrep --answer "What does this repo do and where are the entry points?" .
26
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
26
27
  ```
27
28
 
28
29
  ## Requirements
@@ -75,6 +76,7 @@ rlmgrep [options] "query" [paths...]
75
76
 
76
77
  Common options:
77
78
 
79
+ - `--answer` return a narrative answer before the grep output
78
80
  - `-C N` context lines before/after (grep-style)
79
81
  - `-A N` context lines after
80
82
  - `-B N` context lines before
@@ -95,7 +97,7 @@ Examples:
95
97
 
96
98
  ```sh
97
99
  # Natural-language query over a repo
98
- rlmgrep -n -C 2 "Where is retry/backoff configured and what are the defaults?" .
100
+ rlmgrep -C 2 "Where is retry/backoff configured and what are the defaults?" .
99
101
 
100
102
  # Restrict to Python files
101
103
  rlmgrep "Where do we parse JWTs and enforce expiration?" --type py .
@@ -125,7 +127,7 @@ rg -l "token" . | rlmgrep --files-from-stdin --answer "What does this token cont
125
127
  - Output uses rg-style headings by default:
126
128
  - A file header line like `./path/to/file`
127
129
  - Then `line:\ttext` for matches, `line-\ttext` for context lines
128
- - Line numbers are 1-based.
130
+ - Line numbers are always included and are 1-based.
129
131
  - When context ranges are disjoint, a `--` line separates groups.
130
132
  - Exit codes:
131
133
  - `0` = at least one match
@@ -140,7 +142,7 @@ rlmgrep can interpret traditional regex-style patterns inside a natural-language
140
142
  Example (best-effort regex semantics + extra context):
141
143
 
142
144
  ```sh
143
- rlmgrep -n "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
145
+ rlmgrep "Find Python functions that look like `def test_\\w+` and are marked as slow or flaky in nearby comments." .
144
146
  ```
145
147
 
146
148
  If you need strict, deterministic regex behavior, use `rg`/`grep`.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes