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

anigodb

v0.1.6

Published

A document database library wrapping better-sqlite3-multiple-ciphers with a MongoDB-style API

Readme

import { AnigoDB } from 'anigodb'

const db = AnigoDB.connect({ path: './my-db.db' })
const coll = db.collection('users')

coll.insertOne({ name: 'Alice', age: 30 })
const found = coll.findOne({ name: 'Alice' })

Features

  • MongoDB-style APIinsertOne, find, updateOne, deleteMany, aggregate, etc.
  • Synchronous — wraps better-sqlite3, no callbacks, no promises
  • Query operators$eq, $gt, $gte, $lt, $lte, $ne, $in, $nin, $exists, $regex, $and, $or, $not, $nor
  • Update operators$set, $unset, $inc, $push, $pull, $rename, $mul, $min, $max
  • Encryption — full database encryption via better-sqlite3-multiple-ciphers
  • RAG search — hybrid vector + keyword search with local ONNX embeddings; falls back to keyword-only when no embedding model is configured; _score is cosine similarity (0–1) for vector results, raw BM25 for keyword; supports hybrid, vector, and keyword modes
  • Transactions — synchronous, nested via savepoints
  • Aggregation$match, $sort, $skip, $limit, $count
  • IndexescreateIndex, dropIndex
  • TypeScript — full type definitions
  • Dual ESM/CJS — works with both import and require

Installation

npm install anigodb

AnigoDB depends on better-sqlite3-multiple-ciphers (compiles native code). See docs/01-getting-started.md for platform prerequisites.

Quick Start

import { AnigoDB } from 'anigodb'

const db = AnigoDB.connect({ path: './data.db' })
const users = db.collection('users')

// Insert
const result = users.insertOne({ name: 'Alice', age: 30, role: 'admin' })
console.log('Inserted:', result.insertedId)

// Find with query operators
const admin = users.findOne({ role: 'admin', age: { $gte: 21 } })
console.log('Admin:', admin.name)

// Update
users.updateOne({ _id: result.insertedId }, { $set: { age: 31 }, $inc: { logins: 1 } })

// Aggregate
const stats = users.aggregate([{ $match: { role: 'admin' } }, { $count: 'total' }])
console.log('Admin count:', stats[0]?.total)

// Transactions
db.transaction(() => {
  users.insertOne({ name: 'Bob' })
  users.insertOne({ name: 'Charlie' })
})

// Encryption
const secure = AnigoDB.connect({ path: './secure.db', key: 'my-32-byte-hex-key-here...' })

// RAG search — without an embedding model, creates FTS5 only (keyword search)
const db2 = AnigoDB.connect({ path: './data.db' })
const notes = db2.collection('notes')
notes.createRAGIndex('body')
notes.insertOne({ body: 'Trains models on labeled data.' })
const kw = notes.search('labeled data', { limit: 5 })
// → keyword search, _score is raw BM25

// With an embedding model → full hybrid (vector + keyword) search
const db3 = AnigoDB.connect({
  path: './hybrid.db',
  embedding: { model: 'onnx-community/Qwen3-Embedding-0.6B-ONNX', dtype: 'q8' },
})
const articles = db3.collection('articles')
articles.createRAGIndex('title')
articles.insertOne({ title: 'Machine Learning' })
const results = articles.search('machine learning', { limit: 5 })
// _score is cosine similarity (0–1)

// Search modes
articles.search('machine learning', { mode: 'vector', limit: 5 })  // semantic only
articles.search('machine learning', { mode: 'keyword', limit: 5 }) // FTS5 only

db.close()

Documentation

| Topic | File | | ---------------- | ---------------------------------------------------------- | | Getting Started | docs/01-getting-started.md | | API Reference | docs/02-api-reference.md | | Query Operators | docs/03-query-operators.md | | Update Operators | docs/04-update-operators.md | | Indexes | docs/05-indexes.md | | Encryption | docs/06-encryption.md | | Transactions | docs/07-transactions.md | | Bulk Operations | docs/08-bulk-operations.md | | Aggregation | docs/09-aggregation.md | | Error Handling | docs/10-error-handling.md | | Configuration | docs/11-configuration.md | | FAQ | docs/12-faq.md | | RAG Search | docs/13-rag-search.md |

Examples

License

MIT