{"_id":"@aiconnect/easy-rag","_rev":"20-386e027b22850d21fb639d3a9d4fea7e","name":"@aiconnect/easy-rag","dist-tags":{"latest":"2.7.2"},"versions":{"0.3.0":{"name":"@aiconnect/easy-rag","version":"0.3.0","keywords":["rag","cli","vector-search","embeddings","chromadb","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@0.3.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"e0267472c374317b801ff70111fbff315699886e","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-0.3.0.tgz","fileCount":132,"integrity":"sha512-8KDy5ji/89pGJJ2jM2YeeM2CdDY7Aajth6qFtp/uCMnVO3hhVbCtosJ7KGGDYC9oPM+mvh/1PzxLcEmSBoa4TA==","signatures":[{"sig":"MEUCICrPG0pqfKrXhDs3vUenyDxwFqQWH+133WpYlhObwltEAiEArw1aAVVrtNdQGB85AlN1MRbq1+ck9w+9urW0LdLojPs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120112},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"15ea867a9c0ac4cfae0353c90f714508b3da46f1","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.8.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.0","dependencies":{"openai":"^4.89.0","chromadb":"^2.1.5","commander":"^13.1.0","pdf-parse":"^1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_0.3.0_1770916524563_0.45548506947330947","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aiconnect/easy-rag","version":"0.3.1","keywords":["rag","cli","vector-search","embeddings","chromadb","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@0.3.1","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"8f280eaf853042558b764527e84805e0670c4c01","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-0.3.1.tgz","fileCount":132,"integrity":"sha512-45FyXXb5l4YWuFiHD72gEGy0/utKw0pUA3kLeIGr3wcBhpZzn43K05Px6ntrO5Z9IhBuQNdfwOXtuLl4AaZlpQ==","signatures":[{"sig":"MEUCIAJ75L3GOYBq3iKCbL5f0WTHaz21H4MOGdMDdlniEJagAiEAuMgjAnYQ1jjeKjm90apetK+0fzhUZolQpKCBAjx9mXg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122844},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"9ed4cfce9c52812cb2b9dfbe6b764822427048c2","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.8.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.0","dependencies":{"openai":"^4.89.0","chromadb":"^2.1.5","commander":"^13.1.0","pdf-parse":"^1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_0.3.1_1770917262425_0.5397057588386105","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aiconnect/easy-rag","version":"1.0.1","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@1.0.1","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"7e22b09000aa4f780516040d058e24bd26309032","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-1.0.1.tgz","fileCount":168,"integrity":"sha512-oq7sJFQE8I0IEGwXy8JPZkOaB9d8/TwgNRm76b10BnViSTA9LO+VYIGBxwuC1JJ+4f4jJXJrglo/yz2yWViNtQ==","signatures":[{"sig":"MEQCIE6+tgsbmq/BWd/XSf68DAwFQ5k0GwNPv5qOJvYkFkBFAiBMoBY6LydFErWEjGmhnSfiIUFszb2FTN4zYyPZGJl6vA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208828},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b242c5b20a38f7e2d01aba99cd44fb6b11f0aab6","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_1.0.1_1774130918753_0.4792338937287315","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@aiconnect/easy-rag","version":"2.0.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.0.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"f8abfc04d5d00bd515b3222540ab9d30925544d3","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.0.0.tgz","fileCount":172,"integrity":"sha512-Vn2IUqwLRFCHExZo3fcduLsmdHcLQ9viVt0AG18w/A3ADyKwYhLFs3JQvhC+/tGhY/aEAYmPBMZXfdGSEYQEaA==","signatures":[{"sig":"MEUCIHv9KZ+MHqDEhX7qboA1IuX0Yz/oUAq9uZoLOJBp/KaXAiEA5zY9KyzJB1pd0sQDeeQB4F53jm6HMeBtlBjDntgYL/0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212199},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"161237077389364fb773253f04a509826486cc75","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.0.0_1779320375280_0.19722393141867367","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@aiconnect/easy-rag","version":"2.1.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.1.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"a6261e18e08f96513b298809bbe7841f37fa6ad4","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.1.0.tgz","fileCount":172,"integrity":"sha512-wwa//4PNM8rXCFxOBrLQ9P8+heb567vd7Ucv8AcqcyG9bsbBrXoGV9DAsj6G5STksgF2IAnDL74/kT7WnsfNfQ==","signatures":[{"sig":"MEUCIQCuz2Hs5PLCVo8MFBkL2YYuR6avHz4pOHr5y9Cobzf2KQIgeE/M8KGHqUTIrLOexMJhln2+k8JBy3dQwiRQJjauwX8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230293},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e49d4b70555ab7dbc89bf7cf240185ddb6ab81d6","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.1.0_1779797792306_0.111413084305088","host":"s3://npm-registry-packages-npm-production"}},"2.2.1":{"name":"@aiconnect/easy-rag","version":"2.2.1","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.2.1","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"e279e77290825ee7e9cea9b450d3089d7afb5919","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.2.1.tgz","fileCount":180,"integrity":"sha512-ZXXH/zSAll0oEt7QF2Jae6tddIk1kXKwxZ+aO50n5SnNphaS1bS5CRXJgJW6WMwrwOTER7M60ARXofOCJkbIkA==","signatures":[{"sig":"MEUCIDBY8rRUR8Mv+QXmGI2I1UVmwHCRnFqyWZsDGtmFSleMAiEAnSAdrCDzmi3n/xg/v5aG5EB5GmdfIvg978QHxjofPVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":243313},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ca23af9db487cf43caac758be221057c3c47b0ea","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.2.1_1779829541339_0.8649244182605931","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@aiconnect/easy-rag","version":"2.3.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.3.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/index.js"},"dist":{"shasum":"7141c05eebf839a96b95f9f1a4e7568c3b97b713","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.3.0.tgz","fileCount":180,"integrity":"sha512-kdZ4XX+JGUsISIBfZLu14WThYZdu6Xv9Ms81iZYtNO3W0xGnHkyJ9WgrGLnUlh3zbD4d83vDYmtoWaCFegz73A==","signatures":[{"sig":"MEUCIHW2hL5dkNJBkUZkDb6yI8q78HbJO/mzz9ytzbeEjtj6AiEAzAceAs5xfXiMtkIFdF3ORAjOLjhS1da1c8job3+w09g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":255811},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ca75ac98372e4206b121dbc63d747eb36d31aebd","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.3.0_1779840310517_0.2159023036169827","host":"s3://npm-registry-packages-npm-production"}},"2.4.2":{"name":"@aiconnect/easy-rag","version":"2.4.2","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.4.2","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"7aa1fa61fc373196e7463447a44643a3f4903fa0","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.4.2.tgz","fileCount":200,"integrity":"sha512-s5uK41m/FJiCg3SltzakCE4zdmDy/w6EOiIXCkraLiFs4HOAidYE8pYXked511jQUb88LDebdDLvAS4cUSnavg==","signatures":[{"sig":"MEUCIGkbknxnzU9FeHvO+6qpgncSzeVTc+CLcKTwoGIqYEWKAiEA2UGhuA22MFtswGkf8EptBEJqRvWBewbAfai0IHDBCxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":287562},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"da6eb6d70b88b749700fde89fe06fc374acdfe98","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^4.89.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.4.2_1780348967720_0.4001232940364676","host":"s3://npm-registry-packages-npm-production"}},"2.5.0":{"name":"@aiconnect/easy-rag","version":"2.5.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.5.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"ba13893496064074c75c2858613dff8878bda21c","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.5.0.tgz","fileCount":208,"integrity":"sha512-6qGcOEAY9TK0x3wLi0XjaVGbEsVM6he3tZXGYE96fDpXQgKDBYnaOsj7uXpADZuTezX7xI+fglQaLMRKveCofQ==","signatures":[{"sig":"MEUCIQCyrxFAsG0qr4gZ+6MpQE9l+ehXLWZy1fT+drD47c67xQIgQDC89WpOZDtTWnUdz+YCNTe+TWOvyJE6iq5uht53RRk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315743},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"953ccf8d87a5cd0132c5ea42283d72ca89b96339","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^6.42.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.5.0_1781739421754_0.21282621099971966","host":"s3://npm-registry-packages-npm-production"}},"2.5.1":{"name":"@aiconnect/easy-rag","version":"2.5.1","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.5.1","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"960af4bbd0f890ddc2be685492fa3e348eacc5a7","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.5.1.tgz","fileCount":208,"integrity":"sha512-OIOiqDp4VBO7DKih8yWTufXnyMWqOrl7MjsA6Qwbnkt5TiaLmHI2IEfhkFaMcymKrpIUl3+d3EEQMykXJ/Dg5Q==","signatures":[{"sig":"MEUCIGnyTxFBnGiKIheLew0uNLScJEVRdaZNwcZHNUqD7uDEAiEArq4iMYf5UAxV1FNyWuPR+n/fkxiqERspIEYWjZS5vvU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315697},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e6066ea7f080649c80890a0387458a4f92210093","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^6.42.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.5.1_1781744948713_0.7755572670442574","host":"s3://npm-registry-packages-npm-production"}},"2.6.0":{"name":"@aiconnect/easy-rag","version":"2.6.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.6.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"460c82c557cc82400ab6460f3463431df6a5e4da","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.6.0.tgz","fileCount":208,"integrity":"sha512-JyW/rPUsekZleyBkwUukVPqpsFS+mPkD7ry9+/pyTLO3HCF47vCBXSjssvR7NlAMCGDLqrESCHsXXtYKUw7CkA==","signatures":[{"sig":"MEQCIBDVRBNwXMQrfOqqzpUkDjD3+4/JX3hopQZ6ZJmjpEzuAiB2sQ+9/RnkxSOnWkoHiVwRXrXhuWwSkseLmr17QKeQyQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":317997},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"746b536bde8e262c2e1332c2cda21c3437a2621c","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^6.42.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.6.0_1781749468180_0.2384171307627152","host":"s3://npm-registry-packages-npm-production"}},"2.7.0":{"name":"@aiconnect/easy-rag","version":"2.7.0","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.7.0","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"fcc9b94bfbfd4e92104a81190b35fa6ce9ae5bca","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.7.0.tgz","fileCount":212,"integrity":"sha512-f2xsNBKZU8ZX4SkIawbUhZPMDrUgWUjnkdUssG3J6m648it73zRtq8AKyhcF+I7LBEoDRiPaoAop12Rr+hjcMg==","signatures":[{"sig":"MEQCICUEif8P4M4B+MGOBpV/TbDyMCZihc/WxfY50NZ/FnyyAiBq27J4Si6r2ZomlAxnhVlFF5nK6ainY3peB4M5Xuv6tg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":344452},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a8b57a5c5354dca4d7c1ba97b7a2caa1fb34ac11","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^6.42.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.7.0_1781806990486_0.6339752391155706","host":"s3://npm-registry-packages-npm-production"}},"2.7.1":{"name":"@aiconnect/easy-rag","version":"2.7.1","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","_id":"@aiconnect/easy-rag@2.7.1","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"bin":{"easy-rag":"dist/cli.js"},"dist":{"shasum":"46b7d7d99600ffbfb483f793338acc19eb7f0456","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.7.1.tgz","fileCount":212,"integrity":"sha512-Y4b3pUd1Bpm9olEOcTDdyPT0dV425aCgXZYqHN4hfV4S2tC+XM4ErccwKa/GyFDk7Sto67qx9t9Sy4qGjwMZYA==","signatures":[{"sig":"MEUCIHaBzV7bt/+ZB5iYLo6MZnd8WdYAqDI/2q3QVMy2TlPmAiEA79wuK0Fmn4U7Rf6EIDUIRZZm103Rj42IGHiXpQQpphE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":346835},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"d19604ba6676fb354045dab232eb1884688c9e23","scripts":{"dev":"tsx src/index.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","start":"node dist/index.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"repository":{"url":"git+https://github.com/johnjohn-aic/easy-rag.git","type":"git"},"_npmVersion":"11.9.0","description":"A TypeScript CLI tool for local RAG indexing and querying","directories":{},"_nodeVersion":"25.6.1","dependencies":{"openai":"^6.42.0","commander":"^13.1.0","pdf-parse":"^1.1.1","@zvec/zvec":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^29.7.0","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^29.5.14","@types/node":"^22.19.11"},"_npmOperationalInternal":{"tmp":"tmp/easy-rag_2.7.1_1781822463173_0.006709596895130954","host":"s3://npm-registry-packages-npm-production"}},"2.7.2":{"name":"@aiconnect/easy-rag","version":"2.7.2","description":"A TypeScript CLI tool for local RAG indexing and querying","type":"module","main":"dist/index.js","bin":{"easy-rag":"dist/cli.js"},"scripts":{"build":"tsc","dev":"tsx src/index.ts","start":"node dist/index.js","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch","prepublishOnly":"npm run build"},"publishConfig":{"access":"public"},"keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"author":{"name":"AI Connect"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/johnjohn-aic/easy-rag.git"},"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^22.19.11","jest":"^29.7.0","ts-jest":"^29.4.6","tsx":"^4.21.0","typescript":"^5.9.3"},"dependencies":{"@zvec/zvec":"^0.5.0","commander":"^13.1.0","openai":"^6.42.0","pdf-parse":"^1.1.1"},"engines":{"node":">=18.0.0"},"gitHead":"9c5c37d15c3fbf8e0b55b12d23e06946a42f9c11","types":"./dist/index.d.ts","_id":"@aiconnect/easy-rag@2.7.2","bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"homepage":"https://github.com/johnjohn-aic/easy-rag#readme","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-k+RIHdpe2Tn0oky4HRlVkKN1YcCE/RtucxVnHS7eXxPbyish/7+nsESRe2JMAwOts7lCj4s+9n6319bpyn0sTA==","shasum":"a7ecb884b3387fc52c01504aaeeb95331f56d8ad","tarball":"https://registry.npmjs.org/@aiconnect/easy-rag/-/easy-rag-2.7.2.tgz","fileCount":212,"unpackedSize":347267,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+G6gxCVkGzdIXTW4sUKTc+KKDFLUA4tsowXbt8M1wLgIgYRgI/p5fnDUIEfkN3OMRN3ZUK/vxOj3Bd7Hb6zGNX3Y="}]},"_npmUser":{"name":"ericsantos","email":"ericsantos.net@gmail.com"},"directories":{},"maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/easy-rag_2.7.2_1784492549145_0.9830564182218329"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-12T17:15:24.473Z","modified":"2026-07-19T20:22:29.458Z","0.3.0":"2026-02-12T17:15:24.710Z","0.3.1":"2026-02-12T17:27:42.648Z","1.0.0":"2026-03-21T20:56:25.573Z","1.0.1":"2026-03-21T22:08:38.907Z","2.0.0":"2026-05-20T23:39:35.429Z","2.1.0":"2026-05-26T12:16:32.474Z","2.2.1":"2026-05-26T21:05:41.523Z","2.3.0":"2026-05-27T00:05:10.681Z","2.4.0":"2026-06-01T15:15:21.286Z","2.4.1":"2026-06-01T17:00:45.789Z","2.4.2":"2026-06-01T21:22:47.883Z","2.5.0":"2026-06-17T23:37:02.086Z","2.5.1":"2026-06-18T01:09:08.904Z","2.6.0":"2026-06-18T02:24:28.339Z","2.7.0":"2026-06-18T18:23:10.728Z","2.7.1":"2026-06-18T22:41:03.333Z","2.7.2":"2026-07-19T20:22:29.297Z"},"bugs":{"url":"https://github.com/johnjohn-aic/easy-rag/issues"},"author":{"name":"AI Connect"},"license":"MIT","homepage":"https://github.com/johnjohn-aic/easy-rag#readme","keywords":["rag","cli","vector-search","embeddings","zvec","openai","retrieval-augmented-generation"],"repository":{"type":"git","url":"git+https://github.com/johnjohn-aic/easy-rag.git"},"description":"A TypeScript CLI tool for local RAG indexing and querying","maintainers":[{"name":"ericsantos","email":"ericsantos.net@gmail.com"}],"readme":"# @aiconnect/easy-rag\n\nA TypeScript CLI for local RAG (Retrieval-Augmented Generation) — index documents and query them with natural language.\n\nUses **OpenAI embeddings** and **Zvec** (embedded vector database) for storage. No external infrastructure or server needed.\n\n## Quick Start\n\n**Prerequisites:** Node.js >= 18 and an [OpenAI API key](https://platform.openai.com/api-keys).\n\n```bash\n# Install\nnpm install -g @aiconnect/easy-rag\n\n# Set up your API key (interactive)\neasy-rag init\n\n# Index a folder and query it\neasy-rag index ./my-docs\neasy-rag query \"What is the refund policy?\"\n```\n\nExample output:\n\n```\n$ easy-rag index ./my-docs\nScanning ./my-docs...\nFound 3 files (2 .md, 1 .pdf)\nChunking documents... 12 chunks created\nGenerating embeddings... done\nIndexed 12 chunks into collection \"my-docs\"\n\n$ easy-rag query \"What is the refund policy?\"\nResult 1:\n  Refunds are available within 30 days of purchase.\n  Contact support@example.com to initiate a refund request.\n\nResult 2:\n  All subscription plans include a 30-day money-back guarantee...\n```\n\n## Commands\n\n### `easy-rag init`\n\nInteractive setup — prompts for your OpenAI API key, embedding model, and advanced search settings. Saves to `$XDG_CONFIG_HOME/easy-rag/config.json` (default `~/.config/easy-rag/config.json`).\n\n**Basic Setup:**\n- OpenAI API key\n- Embedding model (text-embedding-3-large, -small, or -ada-002)\n\n**Advanced Settings (optional):**\n- Search mode: auto, hybrid, vector, or bm25 (default: auto)\n- Vector weight: 0.0-1.0 (default: 0.6)\n- BM25 weight: 0.0-1.0 (default: 0.4)\n\nYou can also skip `init` and set an environment variable instead:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\n```\n\n### `easy-rag index <folder>`\n\nScans a folder recursively and indexes all supported files into Zvec.\n\n```bash\neasy-rag index ./knowledge-base\n```\n\n- **Supported formats:** `.pdf`, `.md`, `.csv`\n- **Chunking:** Automatic — Markdown by heading, PDF by paragraph, CSV by row\n- **Collection name:** Derived from the folder name\n- Re-indexing the same folder creates a new collection with a unique suffix\n\n### `easy-rag query <question>`\n\nSearch indexed documents using auto mode (RRF fusion) by default.\n\n```bash\neasy-rag query \"How do I configure API?\"\neasy-rag query --top 3 --metadata \"quarterly revenue\"\neasy-rag query --collection my-docs \"setup instructions\"\neasy-rag query --mode vector \"semantic search only\"\neasy-rag query --mode bm25 \"exact keyword match\"\neasy-rag query --mode hybrid --vector-weight 0.8 --bm25-weight 0.2 \"refund policy\"\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `-t, --top <n>` | Number of results | 5 |\n| `-m, --metadata` | Show source file, score, chunk index | off |\n| `-c, --collection <name>` | Search specific collection | all |\n| `--mode <mode>` | Search mode: auto, hybrid, vector, or bm25 | from config / auto |\n| `--vector-weight <0..1>` | Dense (semantic) fusion weight; overrides config for this query | from config / 0.6 |\n| `--bm25-weight <0..1>` | BM25 (keyword) fusion weight; overrides config for this query | from config / 0.4 |\n\n**Per-query overrides & precedence.** `--mode`, `--vector-weight`, and `--bm25-weight` override the `config.json` values for that single invocation only (the config file is never modified). Each weight resolves independently — supplying just `--vector-weight 0.7` leaves the BM25 weight at its config default. Invalid input fails fast: a weight outside `[0, 1]`, a non-numeric weight, or an unknown `--mode` exits with a non-zero status and a clear message before any embedding request.\n\n**Weights only affect `hybrid` mode.** `auto` fuses by native RRF (rank-based, weights ignored); `vector` and `bm25` are single-arm. Passing weights in a non-`hybrid` mode is accepted but inert and emits a one-line warning.\n\n### `easy-rag collections`\n\nList all indexed collections with document counts.\n\n### `easy-rag delete <collection>`\n\nDelete a collection. Use `--force` to skip confirmation.\n\n```bash\neasy-rag delete my-docs --force\n```\n\n### `easy-rag parse <file>`\n\nParse a single file and print extracted text. Useful for debugging.\n\n ## How It Works\n\n```\nDocuments (.pdf, .md, .csv)\n    │\n    ▼\n┌─────────┐    ┌─────────┐    ┌──────────────┐    ┌────────┐\n│  Parse   │ →  │  Chunk  │ →  │  Embed       │ →  │  Store │\n│          │    │         │    │  (OpenAI)    │    │  (Zvec) │\n└─────────┘    └─────────┘    └──────────────┘    └────────┘\n                                   │                  │\n                                   │    Dense vectors + FTS (BM25) index on text\n                                   │\n                    Query ─── Embed ───┘\n                    │\n    ┌───────────────┼───────────────┐\n    ▼               ▼               ▼\nDense Search    FTS Search    Native rerank\n    │               │               │\n    └───────────────┼───────────────┘\n                    ▼\n            Relevant chunks\n```\n\n1. **Parse** — Extract text from PDF, Markdown, or CSV\n2. **Chunk** — Split intelligently by heading, paragraph, or row\n3. **Embed** — Generate dense vectors via OpenAI (`text-embedding-3-large`); the chunk text is indexed by Zvec's native full-text (BM25) index — no client-side sparse vectors\n4. **Store** — Save in Zvec (embedded, no server needed)\n5. **Query** — Embed the question and find the closest chunks via hybrid search\n\n## Hybrid Search\n\nEasyRAG uses **hybrid search** combining dense vector similarity and Zvec's native full-text (BM25) keyword matching, fused by Zvec's native multi-query reranker.\n\n### Why Hybrid Search?\n\n- **Dense search** captures semantic meaning but can miss exact keywords\n- **Full-text (BM25) search** excels at keyword matches but lacks semantic understanding\n- **Hybrid search** gives the best of both worlds — like production RAG systems\n\n### How It Works\n\n```\n# auto  — RRF, rank-based, no weights:\nscore(d) = 1 / (60 + vector_rank) + 1 / (60 + bm25_rank)\n\n# hybrid — weighted, score-based:\nscore(d) = vector_weight · vector_score(d) + bm25_weight · bm25_score(d)\n```\n\n### Search Modes\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| `auto` (default) | Dense + FTS via native RRF rerank, no weights needed | General queries |\n| `hybrid` | Dense + FTS with configurable weights (native weighted rerank) | Fine-tuned relevance |\n| `vector` | Dense vector similarity only | Semantic/abstract queries |\n| `bm25` | Native full-text (BM25) keyword only | Exact terms, acronyms, names |\n\nIn `hybrid` mode, weights are configurable: vector=0.6, bm25=0.4 (via config.json).\nIn `auto` mode, fusion uses Reciprocal Rank Fusion with rank constant 60 (no weights needed).\n\n> **Note:** Fusion is delegated to Zvec's native multi-query reranker (`@zvec/zvec` ≥ 0.5.0): RRF in `auto`, weighted in `hybrid`. If the native call fails, EasyRAG falls back to manual RRF fusion in JS.\n>\n> **⚠️ Breaking change (native FTS schema):** the collection schema now uses a native FTS index on the chunk text instead of a sparse-vector field, and records `schemaVersion: 2`. Collections built by older versions are **rejected** on query/index with a \"delete and re-index\" error — there is no in-place migration. Delete and re-index your collections (`easy-rag delete <name>` then `easy-rag index <folder>`).\n>\n> **⚠️ BM25 arm requires a re-index (FTS commit fix):** the native FTS index is only committed to a searchable on-disk segment when indexing finishes (`optimizeSync`). Collections indexed before this fix have an **empty FTS index**, so `bm25` returns nothing and `auto`/`hybrid` silently degrade to vector-only. There is no in-place repair — **delete and re-index** any collection built before this version (`easy-rag delete <name>` then `easy-rag index <folder>`).\n\nExample:\n```bash\n# Auto search (default — RRF fusion, no config needed)\neasy-rag query \"refund policy\"\n\n# Hybrid with custom weights from config\neasy-rag query --mode hybrid \"refund policy\"\n\n# Vector-only for semantic queries\neasy-rag query --mode vector \"how does it work?\"\n\n# BM25-only for exact keywords\neasy-rag query --mode bm25 \"API endpoint /v1/users\"\n```\n\n## Configuration\n\n### API Key\n\n| Method | How | Priority |\n|--------|-----|----------|\n| `easy-rag init` | Interactive prompt, saved to `$XDG_CONFIG_HOME/easy-rag/config.json` (default `~/.config/easy-rag/config.json`) | 2nd |\n| Environment variable | `export OPENAI_API_KEY=\"sk-...\"` | 1st (overrides config) |\n\n### Embedding Model\n\nSet during `easy-rag init` or via `EMBEDDING_MODEL` env var.\n\n| Model | Notes |\n|-------|-------|\n| `text-embedding-3-large` | Default, best performance |\n| `text-embedding-3-small` | Faster, cheaper |\n| `text-embedding-ada-002` | Legacy |\n\n### Advanced Search Settings\n\nConfigure during `easy-rag init` or edit `$XDG_CONFIG_HOME/easy-rag/config.json` (default `~/.config/easy-rag/config.json`).\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| `search_mode` | Search mode: auto, hybrid, vector, or bm25 | auto |\n| `vector_weight` | Weight for vector results in hybrid mode (0.0-1.0) | 0.6 |\n| `bm25_weight` | Weight for BM25 (keyword) results in hybrid mode (0.0-1.0) | 0.4 |\n\nWeights don't need to sum to 1.0 — they apply independently in `hybrid` mode's weighted rerank; `auto` ignores them and fuses by RRF.\n\nThese are the **defaults**; any single query can override `search_mode` and the weights via the CLI flags (`--mode`, `--vector-weight`, `--bm25-weight`) or the library `query()` options (`mode`, `vectorWeight`, `bm25Weight`) without editing this file. See [`easy-rag query`](#easy-rag-query-question) for precedence and validation.\n\n### Zvec\n\nZvec is the embedded vector store — no server or external process needed.\n\n- Data is stored in `$XDG_DATA_HOME/easy-rag/collections/` (default `~/.local/share/easy-rag/collections/`), auto-created on first use\n- Each collection is a directory on disk, fully portable\n\n### Storage Paths (XDG Base Directory Specification)\n\nEasyRAG follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) on every platform (Linux and macOS alike — no `~/Library/Application Support` special-case).\n\n| Resource | Path | Override |\n|----------|------|----------|\n| Config (`config.json`) | `~/.config/easy-rag/` | `XDG_CONFIG_HOME` (must be an absolute path) |\n| Data (`collections/`) | `~/.local/share/easy-rag/` | `XDG_DATA_HOME` (must be an absolute path) |\n\nIf `XDG_CONFIG_HOME` / `XDG_DATA_HOME` are unset, empty, whitespace-only, or set to a relative path, EasyRAG falls back to the defaults above.\n\n## Library Usage (Programmatic API)\n\nEasy RAG can also be used as a library in Node.js applications (Express.js, Fastify, etc.):\n\n```typescript\nimport { EasyRAG } from '@aiconnect/easy-rag';\n\nconst rag = new EasyRAG({\n  apiKey: process.env.OPENAI_API_KEY,\n  collectionsDir: '/data/collections',\n  readOnly: true,\n});\n\nconst results = await rag.query('What is the refund policy?', {\n  collection: 'docs',\n  top: 5,\n  mode: 'auto',\n});\n\nfor (const result of results) {\n  console.log(result.content);\n  console.log(`Score: ${result.hybridScore.toFixed(4)}`);\n}\n\nawait rag.close();\n```\n\n### `EasyRAGConfig`\n\n| Option | Type | Required | Default | Description |\n|--------|------|----------|---------|-------------|\n| `collectionsDir` | `string` | Yes | — | Path to collections directory |\n| `apiKey` | `string` | No | `OPENAI_API_KEY` env var | OpenAI API key |\n| `model` | `string` | No | `text-embedding-3-large` | Embedding model |\n| `readOnly` | `boolean` | No | `true` | Open collections read-only |\n| `logger` | `EasyRAGLogger` | No | Silent (no output) | Custom logger |\n| `vectorWeight` | `number` | No | `0.6` | Hybrid weighted vector weight |\n| `bm25Weight` | `number` | No | `0.4` | Hybrid weighted BM25 weight |\n\n### `EasyRAG` Methods\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `query(question, options?)` | `Promise<HybridQueryResult[]>` | Query a collection |\n| `listCollections()` | `CollectionInfo[]` | List loaded collections |\n| `hasCollection(name)` | `boolean` | Check if collection exists |\n| `close()` | `void` | Close all collections (idempotent) |\n\n### `QueryRequestOptions`\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `collection` | `string` | — | Collection name (required for query) |\n| `top` | `number` | `5` | Number of results |\n| `mode` | `'auto' \\| 'hybrid' \\| 'vector' \\| 'bm25'` | constructor / `'auto'` | Search mode for this call |\n| `vectorWeight` | `number` | constructor / `0.6` | Dense fusion weight `[0,1]` for this call; `hybrid` only |\n| `bm25Weight` | `number` | constructor / `0.4` | BM25 fusion weight `[0,1]` for this call; `hybrid` only |\n\nPer-call `mode` / `vectorWeight` / `bm25Weight` override the values set on the `EasyRAG` constructor for that call only; each resolves independently. Out-of-range weights, a degenerate `[0,0]` hybrid weighting, or an unknown `mode` cause `query()` to throw before any embedding request. Weights supplied outside `hybrid` mode are inert and trigger one `logger.warn`.\n\n### Express.js Integration Example\n\n```typescript\nimport express from 'express';\nimport { EasyRAG } from '@aiconnect/easy-rag';\n\nconst app = express();\napp.use(express.json());\n\nconst rag = new EasyRAG({\n  apiKey: process.env.OPENAI_API_KEY,\n  collectionsDir: process.env.COLLECTIONS_DIR!,\n  readOnly: true,\n});\n\napp.get('/query', async (req, res) => {\n  try {\n    const { q, collection = 'docs', top = 5 } = req.query;\n    const results = await rag.query(q as string, {\n      collection: collection as string,\n      top: Number(top),\n    });\n    res.json(results);\n  } catch (error: any) {\n    const status = error.message?.includes('not found') ? 404 : 500;\n    res.status(status).json({ error: error.message });\n  }\n});\n\napp.listen(3000, () => console.log('RAG API on :3000'));\n\nprocess.on('SIGTERM', () => { rag.close(); process.exit(0); });\n```\n\n### Logger Injection\n\nBy default, the library is silent (no console output). Inject a custom logger:\n\n```typescript\nimport { EasyRAG, type EasyRAGLogger } from '@aiconnect/easy-rag';\n\nconst logger: EasyRAGLogger = {\n  info: (msg) => myLogger.info(msg),\n  warn: (msg) => myLogger.warn(msg),\n  error: (msg) => myLogger.error(msg),\n};\n\nconst rag = new EasyRAG({ collectionsDir: '/data', logger });\n```\n\nUse `consoleLogger` for CLI-like output:\n\n```typescript\nimport { EasyRAG, consoleLogger } from '@aiconnect/easy-rag';\nconst rag = new EasyRAG({ collectionsDir: '/data', logger: consoleLogger });\n```\n\n## Development\n\n```bash\ngit clone https://github.com/johnjohn-aic/easy-rag.git\ncd easy-rag\nnpm install\n\nnpm run build       # Compile TypeScript\nnpm test            # Run tests\nnpx tsx src/cli.ts <command>  # Dev mode (no build needed)\n```\n\n### Project Structure\n\n```\nsrc/\n  cli.ts            # CLI entrypoint (commander, shebang)\n  index.ts          # Library API exports\n  lib/              # Programmatic API (EasyRAG class)\n  parsers/          # PDF, Markdown, CSV text extraction\n  chunker/          # Content-aware text splitting\n  embeddings/       # OpenAI embedding generation\n  vector-store/     # Zvec embedded vector store (native FTS index)\n  query/            # Dense, FTS (BM25), and hybrid search\n  indexer/          # Orchestrates parse → chunk → embed → store\n  config/           # Global config (XDG_CONFIG_HOME/easy-rag/config.json)\n  paths/            # XDG-compliant config/data path resolution\n  commands/         # CLI command implementations (init)\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}