jevgrep 0.2.0 → 0.3.0

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.
package/README.md CHANGED
@@ -15,20 +15,12 @@ jgrep "catches an error and silently ignores it" src/
15
15
 
16
16
  *No index. No embeddings. No LLM round-trips. A whole `src/` tree in ~2 s for about a cent.*
17
17
 
18
+ <img src="docs/demo.gif" alt="jgrep demo: semantic search over src/ and a git diff" width="900">
19
+
18
20
  </div>
19
21
 
20
22
  ---
21
23
 
22
- ```
23
- $ jgrep "catches an error and silently ignores it" src/
24
-
25
- src/loop/state.ts:108-115 p=0.96 export function readRun(projectDir: string): RunInfo | null {
26
- src/loop/stop.ts:20-28 p=0.93 function groupAlive(pgid: number): boolean {
27
- src/nl/config-store.ts:33-46 p=0.93 export async function loadProviderConfig(): Promise<...> {
28
- ...
29
- 79 hits / 896 chunks (0 cached) · 240406 tokens · $0.0101 · 1.8s
30
- ```
31
-
32
24
  ## Why
33
25
 
34
26
  | you want to find… | `grep` / `rg` | embeddings | an LLM | **jgrep** |
@@ -92,6 +84,32 @@ Exit status is grep's (`0` matched, `1` nothing, `2` error), so CI negates it:
92
84
  env: { TYPESAFE_API_KEY: "${{ secrets.TYPESAFE_API_KEY }}" }
93
85
  ```
94
86
 
87
+ ### Score a table (CSV / JSONL), not just code
88
+
89
+ Every row becomes one state. One description works like grep; a JSON file of
90
+ Jev questions (noul, choice, score) adds one answer column per question.
91
+
92
+ ```bash
93
+ jgrep --rows creators.csv "beauty is the main content of this account"
94
+ jgrep --rows creators.csv --questions beauty.json --out scored.csv
95
+ ```
96
+
97
+ ```json
98
+ {
99
+ "beauty": { "type": "noul", "instructions": "Is beauty the main content of this account?" },
100
+ "category": { "type": "choice", "instructions": "Dominant sub-category?",
101
+ "criteria": { "skincare": "skin care", "makeup": "cosmetics", "other": "not beauty" } },
102
+ "fit": { "type": "score", "instructions": "Fit for a Korean skincare seeding campaign?",
103
+ "criteria": ["no fit", "weak", "moderate", "strong", "ideal"] }
104
+ }
105
+ ```
106
+
107
+ Question objects are passed to the API verbatim, so anything Jev accepts works.
108
+ Output columns: `beauty` (probability), `category` + `category_p`, `fit` + `fit_conf`.
109
+ Eight creators and five questions is one request, 3k tokens, well under a cent;
110
+ see [`examples/`](examples/). This is the "AI map-reduce" shape: scrape N
111
+ things, ask k typed questions each, filter in a spreadsheet.
112
+
95
113
  ### Feed your coding agent
96
114
 
97
115
  Agents burn most of their tokens *looking* for code. jgrep hands them a short
@@ -113,6 +131,8 @@ a fraction of a cent.
113
131
  jgrep init interactive setup
114
132
  jgrep [options] "<description>" [path ...]
115
133
  jgrep [options] --diff [ref] "<description>"
134
+ jgrep [options] --rows <file.csv|.jsonl> "<description>"
135
+ jgrep [options] --rows <file> --questions <q.json> [--out scored.csv]
116
136
 
117
137
  -t, --threshold <p> print chunks with probability >= p (default 0.7)
118
138
  -C, --show print the matching chunk body under each hit
@@ -120,6 +140,9 @@ jgrep [options] --diff [ref] "<description>"
120
140
  --json machine-readable output
121
141
  --diff [ref] grep git diff hunks (working tree, or against <ref>)
122
142
  --staged with --diff: staged changes only
143
+ --rows <file> grep rows of a CSV / JSONL file instead of code
144
+ --questions <f> with --rows: JSON of Jev questions asked of every row
145
+ --out <file> with --questions: write the CSV here instead of stdout
123
146
  -b, --batch <n> chunks per request (default 16)
124
147
  -c, --concurrency <n> parallel requests (default 16)
125
148
  --no-cache ignore and do not write ~/.cache/jgrep