npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bridgerust/embex

v0.1.20

Published

Embex Vector Database ORM Node.js Bindings

Readme

Embex (Node.js)

The fastest way to add vector search to your app.

Embex is a universal vector database client that lets you start with zero setup and scale to production without rewriting code.

🚀 Features

  • Start Simple: Use LanceDB (embedded) for zero-setup local development.
  • Unified API: Switch to Qdrant, Pinecone, or Milvus just by changing the config.
  • Performance: Powered by a shared Rust core with SIMD acceleration.
  • Type Safety: Full TypeScript support.

📦 Installation

npm install @bridgerust/embex lancedb @xenova/transformers

⚡ Quick Start

Build semantic search in 5 minutes using LanceDB (embedded) and local embeddings. No API keys or Docker needed!

import { EmbexClient, Vector } from "@bridgerust/embex";
import { pipeline } from "@xenova/transformers";

async function main() {
  // 1. Setup Embedding Model
  const generateEmbedding = await pipeline(
    "feature-extraction",
    "Xenova/all-MiniLM-L6-v2"
  );
  const embed = async (text: string) => {
    const output = await generateEmbedding(text, {
      pooling: "mean",
      normalize: true,
    });
    return Array.from(output.data);
  };

  // 2. Initialize Client (uses LanceDB embedded)
  const client = await EmbexClient.newAsync("lancedb", "./data");

  // 3. Create Collection (384 dimensions for MiniLM)
  await client.createCollection("products", 384);

  // 4. Insert Data
  const documents = [
    { id: "1", text: "Apple iPhone 15", category: "electronics" },
    { id: "2", text: "Samsung Galaxy S24", category: "electronics" },
  ];

  const vectors: Vector[] = [];
  for (const doc of documents) {
    vectors.push({
      id: doc.id,
      vector: await embed(doc.text),
      metadata: { text: doc.text },
    });
  }

  await client.insert("products", vectors);

  // 5. Search
  const query = "smartphone";
  const results = await client.search({
    collection_name: "products",
    vector: await embed(query),
    limit: 1,
  });

  console.log(`Query: '${query}'`);
  console.log(`Match: ${results[0].metadata.text}`);
}

main();

🗺️ Development → Production Roadmap

| Stage | Recommendation | Why? | | :------------------ | :-------------------- | :---------------------------------- | | Day 1: Learning | LanceDB | Embedded. Zero setup. Free. | | Week 2: Staging | Qdrant / Pinecone | Managed cloud. Connection pooling. | | Month 1: Scale | Milvus | Distributed. Billion-scale vectors. | | Anytime | PgVector | You already use PostgreSQL. |

☁️ Switch Provider (Zero Code Changes)

Ready for production? Just change the initialization line.

From LanceDB (Dev):

const client = await EmbexClient.newAsync("lancedb", "./data");

To Qdrant Cloud (Prod):

const client = new EmbexClient(
  "qdrant",
  "https://your-cluster.qdrant.io",
  process.env.QDRANT_API_KEY
);

🔄 Data Migration

Move data between providers effortlessly using the built-in DataMigrator.

import { EmbexClient, DataMigrator } from "@bridgerust/embex";

// 1. Setup clients
const source = await EmbexClient.newAsync("lancedb", "./local_data");
const dest = new EmbexClient("qdrant", "http://prod-db:6333");

// 2. Migrate
const migrator = new DataMigrator(source, dest);
const result = await migrator.migrateSimple(
  "products", // source
  "products_v2" // destination
);

console.log(`Migrated ${result.pointsMigrated} points!`);

🔗 Resources