raggrep 0.16.0 → 0.17.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
@@ -153,6 +153,7 @@ raggrep reset # Clear the index
153
153
 
154
154
  ```bash
155
155
  raggrep query "user login" # Natural language query
156
+ raggrep query -C ~/projects/my-app "login" # Search a project without cd
156
157
  raggrep query "AUTH_SERVICE_URL" # Exact identifier (auto-triggers exact match)
157
158
  raggrep query "\`AuthService\`" # Backticks force exact match
158
159
  raggrep query "error handling" --top 5 # Limit results
@@ -164,6 +165,7 @@ raggrep query "api" -f src/api -f src/routes # Multiple path filters
164
165
 
165
166
  | Flag | Short | Description |
166
167
  | ----------------- | ----- | ---------------------------------------------------------- |
168
+ | `--dir <path>` | `-C` | Project directory to search (default: current directory) |
167
169
  | `--top <n>` | `-k` | Number of results to return (default: 10) |
168
170
  | `--min-score <n>` | `-s` | Minimum similarity score 0-1 (default: 0.15) |
169
171
  | `--type <ext>` | `-t` | Filter by file extension (e.g., ts, tsx, js) |
@@ -234,6 +236,7 @@ Exact matches are shown in a separate section with line numbers and context. Sem
234
236
 
235
237
  ```bash
236
238
  raggrep index # Index current directory
239
+ raggrep index --dir ../other-repo # Index another path without cd
237
240
  raggrep index --watch # Watch mode - re-index on file changes
238
241
  raggrep index --verbose # Show detailed progress
239
242
  raggrep index --concurrency 8 # Set parallel workers (default: auto)
@@ -242,18 +245,21 @@ raggrep index --model bge-small-en-v1.5 # Use specific embedding model
242
245
 
243
246
  | Flag | Short | Description |
244
247
  | ------------------- | ----- | ------------------------------------------------------- |
248
+ | `--dir <path>` | `-C` | Project directory to index (default: current directory) |
245
249
  | `--watch` | `-w` | Watch for file changes and re-index automatically |
246
250
  | `--verbose` | `-v` | Show detailed progress |
247
251
  | `--concurrency <n>` | `-c` | Number of parallel workers (default: auto based on CPU) |
248
- | `--model <name>` | `-m` | Embedding model to use |
252
+ | `--model <name>` | `-m` | Override TypeScript module embedding model (saved config otherwise) |
249
253
  | `--help` | `-h` | Show help message |
250
254
 
251
255
  ### Other Commands
252
256
 
253
257
  ```bash
254
- raggrep status # Show index status and statistics
255
- raggrep reset # Clear the index completely
256
- raggrep --version # Show version
258
+ raggrep status # Show index status and statistics
259
+ raggrep status --dir ./packages/api
260
+ raggrep reset # Clear the index for the current directory
261
+ raggrep reset -C ~/projects/my-app
262
+ raggrep --version # Show version
257
263
  ```
258
264
 
259
265
  ## How It Works
@@ -263,7 +269,25 @@ raggrep --version # Show version
263
269
  3. **Files changed** — Re-indexes only modified files automatically
264
270
  4. **Files deleted** — Stale entries cleaned up automatically
265
271
 
266
- The index is stored in a system temp directory, keeping your project clean.
272
+ The index is stored under **`.raggrep/`** in the project directory you index or pass with **`--dir` / `-C`** (by default, the current working directory). Add `.raggrep/` to `.gitignore` if you do not want index files in version control.
273
+
274
+ ## Embeddings and benchmarks
275
+
276
+ Indexing uses Transformers.js–style **local ONNX** models. Unless you change `.raggrep/config.json` or pass **`raggrep index --model`**, a fresh install uses this stack:
277
+
278
+ | | Default |
279
+ |---|--------|
280
+ | **Runtime** | **`huggingface`** (`@huggingface/transformers`). Set `embeddingRuntime` to `"xenova"` on a module in `.raggrep/config.json` to use `@xenova/transformers` instead. |
281
+ | **Model** | **`bge-small-en-v1.5`** on each embedding-backed module (TypeScript, Python, Go, Rust, JSON, markdown). |
282
+
283
+ **Benchmarks** (clone [next-convex-starter-app](https://github.com/conradkoh/next-convex-starter-app) at a pinned commit; see each script for options):
284
+
285
+ | Command | What it measures | Source |
286
+ |--------|------------------|--------|
287
+ | `bun run bench:embeddings` | Embedding throughput (runtime × model matrix; **nomic** omitted from the harness for now) | [`scripts/benchmark-embedding-runtimes.ts`](./scripts/benchmark-embedding-runtimes.ts) |
288
+ | `bun run bench:retrieval` | Index + hybrid search time and accuracy vs golden queries | [`scripts/benchmark-retrieval-quality.ts`](./scripts/benchmark-retrieval-quality.ts) |
289
+
290
+ Golden query set: [`scripts/eval/golden-queries-next-convex.json`](./scripts/eval/golden-queries-next-convex.json). Retrieval runs write `scripts/benchmarks/<benchmark-name>.result.md` and resumable `*.cache.json` (ignored by git by default).
267
291
 
268
292
  ## What Gets Indexed
269
293