Registry / search / mikser-io-vector

mikser-io-vector

JSON →
library1.2.0jsnpmunverified

An indexing and search plugin for the mikser-io static site generator that uses OpenAI embeddings and either sqlite-vec or pgvector for storage. Version 1.2.0 is current, with active development. It integrates semantic search directly into the build lifecycle — indexing entities as they are processed, providing a findSimilar() runtime helper, and optionally exposing an HTTP search endpoint. This eliminates the need for external search services like Algolia, keeping the index in sync without additional infrastructure.

npm install mikser-io-vector
INSTALL
IMPORT
SIG · MIKSER-IO-VECTOR
M
mikser-io-vector
searchjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import vector from 'mikser-io-vector'
const vector = require('mikser-io-vector')
ESM-only; CommonJS require() not supported
findSimilar
import { findSimilar } from 'mikser-io-vector'
const findSimilar = require('mikser-io-vector').findSimilar
Named export; ESM-only
VectorConfig
import type { VectorConfig } from 'mikser-io-vector'
import { VectorConfig } from 'mikser-io-vector'
TypeScript type only; not a runtime value

Basic configuration for mikser-io-vector with one store 'documents' indexing title and content using OpenAI embeddings.

// mikser.config.js export default { plugins: ['documents', 'layouts', 'render-hbs', 'api', 'vector'], vector: { openai: { apiKey: process.env.OPENAI_API_KEY || '', model: 'text-embedding-3-small', dim: 1536, }, stores: { documents: { map: async (entity) => ({ title: entity.meta?.title, content: entity.content, }), }, }, }, }
Debug
Known issues
breakingPlugin requires mikser-io ^7.0.0; ensure your mikser version is compatible.
fix
Upgrade mikser-io to version 7 or later.
affects: <7.0.0
breakingESM-only package; cannot be required with require().
fix
Use import syntax and ensure your project is configured for ESM.
affects: >=1.0.0
deprecatedThe 'client' option with value 'sqlite' or 'sqlite3' is deprecated in favor of 'better-sqlite3'.
fix
Use client: 'better-sqlite3'.
affects: >=1.0.0
gotchaThe OpenAI dimension (dim) must match the model's output dimensions; mismatch will cause errors.
fix
Set dim to 1536 for text-embedding-3-small or 3072 for text-embedding-3-large.
affects: >=1.0.0
gotchaHTTP endpoint requires a shared Express app; if not present, the endpoint is not mounted silently.
fix
Ensure your mikser configuration includes the 'api' plugin and a server setup.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'mikser-io-vector'
Package not installed or not in node_modules.
fix
Run npm install mikser-io-vector
Missing OPENAI_API_KEY environment variable
OpenAI API key not provided.
fix
Set OPENAI_API_KEY in environment or configure vector.openai.apiKey in config.
Error: operation is not supported for type 'sqlite'
Using deprecated client alias 'sqlite'.
fix
Change client to 'better-sqlite3'.
TypeError: Cannot read properties of undefined (reading 'title')
Entity missing expected property in map function.
fix
Add null safety checks or ensure entity structure matches map.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
mikser-iorequiredPeer dependency; core framework runtime
Agent activity
36 hits · last 30 days
node
30
OpenAI (training)
1
Resources
mikser-io-vector — npm install mikser-io-vector · libregistry