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

chromadb-zerodb

v1.0.0

Published

Drop-in ChromaDB replacement backed by ZeroDB cloud vectors. No Docker, no setup — just import and go.

Readme

chromadb-zerodb

Drop-in ChromaDB replacement for JavaScript/TypeScript. Backed by ZeroDB cloud vectors.

No Docker. No setup. No infrastructure. Just npm install and go.

npm install chromadb-zerodb

Quick Start

import { Client } from "chromadb-zerodb";

const client = new Client();
const collection = await client.createCollection("my_docs");

// Add documents (auto-embedded via ZeroDB)
await collection.add({
  documents: [
    "Python is a great programming language",
    "JavaScript powers the web",
    "Rust is fast and memory-safe",
  ],
  ids: ["doc1", "doc2", "doc3"],
  metadatas: [
    { topic: "python" },
    { topic: "javascript" },
    { topic: "rust" },
  ],
});

// Semantic search
const results = await collection.query({
  queryTexts: ["best language for beginners"],
  nResults: 2,
});

console.log(results.documents); // [["Python is a great...", "JavaScript powers..."]]
console.log(results.distances); // [[0.23, 0.41]]

Why chromadb-zerodb?

| Feature | ChromaDB | chromadb-zerodb | |---------|----------|-----------------| | Setup | Docker + server | npm install | | Infrastructure | Self-hosted | Cloud (free tier) | | Embeddings | Bring your own | Auto-embedded (bge-m3, 1024-dim) | | Scaling | Manual | Automatic | | API | ChromaDB API | Same ChromaDB API |

Configuration

Zero Config (Auto-Provisioning)

Just create a client with no arguments. A free ZeroDB project is auto-provisioned:

const client = new Client(); // auto-provisions, prints claim URL

The project lasts 72 hours. Claim it to keep it permanently (link printed in console).

With Credentials

const client = new Client({
  apiKey: "zdb_live_...",
  projectId: "your-project-id",
});

Environment Variables

export ZERODB_API_KEY="zdb_live_..."
export ZERODB_PROJECT_ID="your-project-id"
# Optional:
export ZERODB_BASE_URL="https://api.ainative.studio"

API Reference

Client

import { Client } from "chromadb-zerodb";

const client = new Client({ apiKey, projectId, baseUrl });

await client.createCollection(name, metadata);     // -> Collection
await client.getCollection(name);                   // -> Collection
await client.getOrCreateCollection(name, metadata); // -> Collection
await client.listCollections();                     // -> string[]
await client.deleteCollection(name);                // -> void
await client.heartbeat();                           // -> number (ns timestamp)

Collection

// Add documents (auto-embedded)
await collection.add({
  documents: ["text1", "text2"],
  ids: ["id1", "id2"],           // optional, auto-generated
  metadatas: [{ key: "val" }],   // optional
});

// Add pre-computed embeddings
await collection.add({
  ids: ["id1"],
  embeddings: [[0.1, 0.2, 0.3, ...]],
  documents: ["original text"],
});

// Semantic search
const results = await collection.query({
  queryTexts: ["search query"],
  nResults: 10,
  where: { topic: "python" },   // optional metadata filter
});
// Returns: { ids: [[...]], documents: [[...]], metadatas: [[...]], distances: [[...]] }

// Get by ID
const docs = await collection.get({ ids: ["id1", "id2"] });
// Returns: { ids: [...], documents: [...], metadatas: [...] }

// Get by metadata filter
const filtered = await collection.get({ where: { topic: "python" } });

// Update
await collection.update({
  ids: ["id1"],
  documents: ["updated text"],
  metadatas: [{ topic: "updated" }],
});

// Upsert (insert or update)
await collection.upsert({
  ids: ["id1"],
  documents: ["new or updated text"],
});

// Delete
await collection.delete({ ids: ["id1", "id2"] });
await collection.delete({ where: { topic: "old" } });

// Count
const count = await collection.count();

Migration from ChromaDB

Change one line:

- import { ChromaClient } from "chromadb";
+ import { Client } from "chromadb-zerodb";

- const client = new ChromaClient();
+ const client = new Client();

Everything else stays the same.

CommonJS

const { Client } = require("chromadb-zerodb");

Requirements

  • Node.js >= 18 (uses native fetch)
  • No external dependencies

Links

License

MIT