A lightweight, zero-dependency vector database ecosystem for Node.js.
Trovec is designed for applications that need vector search without the overhead of a full database server — think embedded search, local-first apps, CLI tools, prototypes, and small-to-medium production workloads. It runs entirely in-process with zero dependencies.
To help you decide quickly, here's what Trovec handles well and where it isn't the right fit:
Trovec works great when:
npm install and goConsider a dedicated vector database when:
These numbers are from stress tests on 128-dimension F32 vectors. Higher dimensions (384d, 768d) multiply resource usage proportionally.
We respect your time. If Trovec fits your needs, you get a clean, simple API with no operational overhead. If it doesn't, we'd rather you know that upfront than discover it after integration.
Where we're headed: Trovec will stay lightweight and zero-dependency — that's a core principle, not a phase. But we're actively working to push the boundaries of what's practical within that philosophy. Our current target is supporting 1M entries with reasonable memory usage and operation times. If something matters to you, let us know — user feedback drives what we prioritize.
| Package | Description | npm |
|---|---|---|
@trovec/core | Core vector database library | |
@trovec/embedder-local | Zero-dependency local embedder (testing/demos) | |
@trovec/embedder-edge | Bundled ONNX embedder — competitive with cloud quality on English content, fully offline, ~32× faster query latency | |
@trovec/embedder-openai | OpenAI embeddings adapter | |
@trovec/embedder-ollama | Ollama local embeddings adapter |
| Package | Description | Install |
|---|---|---|
@trovec/cli | Command-line interface for trovec | |
| Trovec Viewer for VS Code | VS Code extension for viewing and querying .trovec files |
# Core library only (bring your own vectors)
npm install @trovec/core
# With local embedder (no API key needed — great for trying out Trovec)
npm install @trovec/core @trovec/embedder-local
# With bundled ONNX embedder (real semantic embeddings, fully offline, no setup)
npm install @trovec/core @trovec/embedder-edge
# With Ollama embeddings (local, no API key needed — requires running Ollama server)
npm install @trovec/core @trovec/embedder-ollama
# With OpenAI embeddings (production-quality semantic search)
npm install @trovec/core @trovec/embedder-openai
import { create, createFileDriver } from '@trovec/core';
// Persistent storage with Brotli compression (zero-config)
const driver = createFileDriver();
const db = await create({ dimensions: 3, storageDriver: driver });
db.add({ id: 'cat', embedding: [0.9, 0.1, 0.0], context: { type: 'animal' } });
db.add({ id: 'car', embedding: [0.0, 0.1, 0.9], context: { type: 'vehicle' } });
const results = db.query({ vector: [1, 0, 0], topK: 1 });
// [{ id: 'cat', score: 0.993..., context: { type: 'animal' } }]
await db.flush(); // persist to disk
For multi-process environments, use the concurrent file driver with file locking and optional WAL:
import { create, createConcurrentFileDriver } from '@trovec/core';
const driver = createConcurrentFileDriver({ wal: true });
const db = await create({ dimensions: 3, storageDriver: driver });
See each package's README for detailed documentation.
trovec/
package.json Root workspace config (private)
tsconfig.base.json Shared TypeScript options
vitest.config.ts Runs tests across all packages
packages/
core/ Core library
embedder-local/ Local embedder (testing/demos)
embedder-edge/ Bundled ONNX embedder (offline, real semantic embeddings)
embedder-openai/ OpenAI embeddings adapter
embedder-ollama/ Ollama local embeddings adapter
cli/ Command-line interface
vscode-trovec/ VS Code extension
demo/ Interactive CLI demo
This is an npm workspaces monorepo. Each package under packages/ is published independently to npm.
npm install # install all workspace dependencies
npm test # run all tests across all packages
npm run build --workspaces # build all packages
# Per-package commands
npm test --workspace=packages/core
npm run build --workspace=packages/embedder-openai
Trovec's Embedder interface is the extension point for text-to-vector conversion. See the adapter guide in the core README or use @trovec/embedder-openai as a reference implementation.
MIT
49 commits
TypeScript
92.9%
JavaScript
3.5%
HTML
2.4%
CSS
1.0%
A lightweight, zero-dependency vector database ecosystem for Node.js.
Trovec is designed for applications that need vector search without the overhead of a full database server — think embedded search, local-first apps, CLI tools, prototypes, and small-to-medium production workloads. It runs entirely in-process with zero dependencies.
To help you decide quickly, here's what Trovec handles well and where it isn't the right fit:
Trovec works great when:
npm install and goConsider a dedicated vector database when:
These numbers are from stress tests on 128-dimension F32 vectors. Higher dimensions (384d, 768d) multiply resource usage proportionally.
We respect your time. If Trovec fits your needs, you get a clean, simple API with no operational overhead. If it doesn't, we'd rather you know that upfront than discover it after integration.
Where we're headed: Trovec will stay lightweight and zero-dependency — that's a core principle, not a phase. But we're actively working to push the boundaries of what's practical within that philosophy. Our current target is supporting 1M entries with reasonable memory usage and operation times. If something matters to you, let us know — user feedback drives what we prioritize.
| Package | Description | npm |
|---|---|---|
@trovec/core | Core vector database library | |
@trovec/embedder-local | Zero-dependency local embedder (testing/demos) | |
@trovec/embedder-edge | Bundled ONNX embedder — competitive with cloud quality on English content, fully offline, ~32× faster query latency | |
@trovec/embedder-openai | OpenAI embeddings adapter | |
@trovec/embedder-ollama | Ollama local embeddings adapter |
| Package | Description | Install |
|---|---|---|
@trovec/cli | Command-line interface for trovec | |
| Trovec Viewer for VS Code | VS Code extension for viewing and querying .trovec files |
# Core library only (bring your own vectors)
npm install @trovec/core
# With local embedder (no API key needed — great for trying out Trovec)
npm install @trovec/core @trovec/embedder-local
# With bundled ONNX embedder (real semantic embeddings, fully offline, no setup)
npm install @trovec/core @trovec/embedder-edge
# With Ollama embeddings (local, no API key needed — requires running Ollama server)
npm install @trovec/core @trovec/embedder-ollama
# With OpenAI embeddings (production-quality semantic search)
npm install @trovec/core @trovec/embedder-openai
import { create, createFileDriver } from '@trovec/core';
// Persistent storage with Brotli compression (zero-config)
const driver = createFileDriver();
const db = await create({ dimensions: 3, storageDriver: driver });
db.add({ id: 'cat', embedding: [0.9, 0.1, 0.0], context: { type: 'animal' } });
db.add({ id: 'car', embedding: [0.0, 0.1, 0.9], context: { type: 'vehicle' } });
const results = db.query({ vector: [1, 0, 0], topK: 1 });
// [{ id: 'cat', score: 0.993..., context: { type: 'animal' } }]
await db.flush(); // persist to disk
For multi-process environments, use the concurrent file driver with file locking and optional WAL:
import { create, createConcurrentFileDriver } from '@trovec/core';
const driver = createConcurrentFileDriver({ wal: true });
const db = await create({ dimensions: 3, storageDriver: driver });
See each package's README for detailed documentation.
trovec/
package.json Root workspace config (private)
tsconfig.base.json Shared TypeScript options
vitest.config.ts Runs tests across all packages
packages/
core/ Core library
embedder-local/ Local embedder (testing/demos)
embedder-edge/ Bundled ONNX embedder (offline, real semantic embeddings)
embedder-openai/ OpenAI embeddings adapter
embedder-ollama/ Ollama local embeddings adapter
cli/ Command-line interface
vscode-trovec/ VS Code extension
demo/ Interactive CLI demo
This is an npm workspaces monorepo. Each package under packages/ is published independently to npm.
npm install # install all workspace dependencies
npm test # run all tests across all packages
npm run build --workspaces # build all packages
# Per-package commands
npm test --workspace=packages/core
npm run build --workspace=packages/embedder-openai
Trovec's Embedder interface is the extension point for text-to-vector conversion. See the adapter guide in the core README or use @trovec/embedder-openai as a reference implementation.
MIT
49 commits
TypeScript
92.9%
JavaScript
3.5%
HTML
2.4%
CSS
1.0%