raggrep 0.5.2 → 0.6.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
@@ -100,13 +100,13 @@ raggrep query "auth" --filter src/auth # Filter by path
100
100
  raggrep query "api" -f src/api -f src/routes # Multiple path filters
101
101
  ```
102
102
 
103
- | Flag | Short | Description |
104
- |------|-------|-------------|
105
- | `--top <n>` | `-k` | Number of results to return (default: 10) |
106
- | `--min-score <n>` | `-s` | Minimum similarity score 0-1 (default: 0.15) |
107
- | `--type <ext>` | `-t` | Filter by file extension (e.g., ts, tsx, js) |
108
- | `--filter <path>` | `-f` | Filter by path prefix (can be used multiple times) |
109
- | `--help` | `-h` | Show help message |
103
+ | Flag | Short | Description |
104
+ | ----------------- | ----- | -------------------------------------------------- |
105
+ | `--top <n>` | `-k` | Number of results to return (default: 10) |
106
+ | `--min-score <n>` | `-s` | Minimum similarity score 0-1 (default: 0.15) |
107
+ | `--type <ext>` | `-t` | Filter by file extension (e.g., ts, tsx, js) |
108
+ | `--filter <path>` | `-f` | Filter by path prefix (can be used multiple times) |
109
+ | `--help` | `-h` | Show help message |
110
110
 
111
111
  ### Index Options
112
112
 
@@ -118,13 +118,13 @@ raggrep index --concurrency 8 # Set parallel workers (default: auto)
118
118
  raggrep index --model bge-small-en-v1.5 # Use specific embedding model
119
119
  ```
120
120
 
121
- | Flag | Short | Description |
122
- |------|-------|-------------|
123
- | `--watch` | `-w` | Watch for file changes and re-index automatically |
124
- | `--verbose` | `-v` | Show detailed progress |
125
- | `--concurrency <n>` | `-c` | Number of parallel workers (default: auto based on CPU) |
126
- | `--model <name>` | `-m` | Embedding model to use |
127
- | `--help` | `-h` | Show help message |
121
+ | Flag | Short | Description |
122
+ | ------------------- | ----- | ------------------------------------------------------- |
123
+ | `--watch` | `-w` | Watch for file changes and re-index automatically |
124
+ | `--verbose` | `-v` | Show detailed progress |
125
+ | `--concurrency <n>` | `-c` | Number of parallel workers (default: auto based on CPU) |
126
+ | `--model <name>` | `-m` | Embedding model to use |
127
+ | `--help` | `-h` | Show help message |
128
128
 
129
129
  ### Other Commands
130
130
 
package/dist/cli/main.js CHANGED
@@ -43,7 +43,7 @@ class TransformersEmbeddingProvider {
43
43
  initPromise = null;
44
44
  constructor(config) {
45
45
  this.config = {
46
- model: config?.model ?? "all-MiniLM-L6-v2",
46
+ model: config?.model ?? "bge-small-en-v1.5",
47
47
  showProgress: config?.showProgress ?? false,
48
48
  logger: config?.logger
49
49
  };
@@ -157,7 +157,7 @@ class TransformersEmbeddingProvider {
157
157
  return results;
158
158
  }
159
159
  getDimension() {
160
- return EMBEDDING_DIMENSION;
160
+ return EMBEDDING_DIMENSIONS[this.config.model];
161
161
  }
162
162
  getModelName() {
163
163
  return this.config.model;
@@ -206,7 +206,7 @@ async function getEmbeddings(texts) {
206
206
  const provider = await ensureGlobalProvider();
207
207
  return provider.getEmbeddings(texts);
208
208
  }
209
- var CACHE_DIR, EMBEDDING_MODELS, EMBEDDING_DIMENSION = 384, BATCH_SIZE = 32, globalProvider = null, globalConfig;
209
+ var CACHE_DIR, EMBEDDING_MODELS, EMBEDDING_DIMENSIONS, BATCH_SIZE = 32, globalProvider = null, globalConfig;
210
210
  var init_transformersEmbedding = __esm(() => {
211
211
  CACHE_DIR = path.join(os.homedir(), ".cache", "raggrep", "models");
212
212
  env.cacheDir = CACHE_DIR;
@@ -215,10 +215,18 @@ var init_transformersEmbedding = __esm(() => {
215
215
  "all-MiniLM-L6-v2": "Xenova/all-MiniLM-L6-v2",
216
216
  "all-MiniLM-L12-v2": "Xenova/all-MiniLM-L12-v2",
217
217
  "bge-small-en-v1.5": "Xenova/bge-small-en-v1.5",
218
- "paraphrase-MiniLM-L3-v2": "Xenova/paraphrase-MiniLM-L3-v2"
218
+ "paraphrase-MiniLM-L3-v2": "Xenova/paraphrase-MiniLM-L3-v2",
219
+ "nomic-embed-text-v1.5": "nomic-ai/nomic-embed-text-v1.5"
220
+ };
221
+ EMBEDDING_DIMENSIONS = {
222
+ "all-MiniLM-L6-v2": 384,
223
+ "all-MiniLM-L12-v2": 384,
224
+ "bge-small-en-v1.5": 384,
225
+ "paraphrase-MiniLM-L3-v2": 384,
226
+ "nomic-embed-text-v1.5": 768
219
227
  };
220
228
  globalConfig = {
221
- model: "all-MiniLM-L6-v2",
229
+ model: "bge-small-en-v1.5",
222
230
  showProgress: false,
223
231
  logger: undefined
224
232
  };
@@ -481,10 +489,10 @@ function getModuleConfig(config, moduleId) {
481
489
  }
482
490
  function getEmbeddingConfigFromModule(moduleConfig) {
483
491
  const options = moduleConfig.options || {};
484
- const modelName = options.embeddingModel || "all-MiniLM-L6-v2";
492
+ const modelName = options.embeddingModel || "bge-small-en-v1.5";
485
493
  if (!(modelName in EMBEDDING_MODELS2)) {
486
- console.warn(`Unknown embedding model: ${modelName}, falling back to all-MiniLM-L6-v2`);
487
- return { model: "all-MiniLM-L6-v2" };
494
+ console.warn(`Unknown embedding model: ${modelName}, falling back to bge-small-en-v1.5`);
495
+ return { model: "bge-small-en-v1.5" };
488
496
  }
489
497
  return {
490
498
  model: modelName,
@@ -500,7 +508,8 @@ var init_configLoader = __esm(() => {
500
508
  "all-MiniLM-L6-v2": "Xenova/all-MiniLM-L6-v2",
501
509
  "all-MiniLM-L12-v2": "Xenova/all-MiniLM-L12-v2",
502
510
  "bge-small-en-v1.5": "Xenova/bge-small-en-v1.5",
503
- "paraphrase-MiniLM-L3-v2": "Xenova/paraphrase-MiniLM-L3-v2"
511
+ "paraphrase-MiniLM-L3-v2": "Xenova/paraphrase-MiniLM-L3-v2",
512
+ "nomic-embed-text-v1.5": "nomic-ai/nomic-embed-text-v1.5"
504
513
  };
505
514
  });
506
515
 
@@ -4855,7 +4864,7 @@ async function getIndexStatus(rootDir) {
4855
4864
  }
4856
4865
  return status;
4857
4866
  }
4858
- var INDEX_SCHEMA_VERSION = "1.0.0", DEFAULT_CONCURRENCY;
4867
+ var INDEX_SCHEMA_VERSION = "1.1.0", DEFAULT_CONCURRENCY;
4859
4868
  var init_indexer = __esm(() => {
4860
4869
  init_config2();
4861
4870
  init_registry();
@@ -5032,7 +5041,7 @@ init_logger();
5032
5041
  // package.json
5033
5042
  var package_default = {
5034
5043
  name: "raggrep",
5035
- version: "0.5.2",
5044
+ version: "0.6.0",
5036
5045
  description: "Local filesystem-based RAG system for codebases - semantic search using local embeddings",
5037
5046
  type: "module",
5038
5047
  main: "./dist/index.js",
@@ -5493,4 +5502,4 @@ Run 'raggrep <command> --help' for more information.
5493
5502
  }
5494
5503
  main();
5495
5504
 
5496
- //# debugId=3B601F4F22C997A464756E2164756E21
5505
+ //# debugId=5883D798B8D780D764756E2164756E21