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

@deonis/hive

v1.4.7

Published

Lightweight file-based multimodal vector database and semantic search engine for Node.js with MCP server support

Downloads

151

Readme

Hive

Hive is a lightweight, file-based multimodal vector database and semantic search engine for Node.js. It stores, retrieves, and searches text and image documents using vector embeddings — no external services required.

Features

  • Multimodal — Store text and images in the same database
  • Semantic Search — Text-to-text, text-to-image, and image-to-image similarity search
  • Auto-processing — Automatically detects file types and generates embeddings
  • File support.txt, .doc, .docx, .pdf (text); .png, .jpg, .jpeg (images)
  • Binary persistence — On-disk .bin with msgpackr-serialized for fast startup
  • Configurable chunking — Configurable SliceSize, overlap, and minSliceSize
  • File watching — Watch directories for changes with chokidar
  • Cross-encoder reranking — Optional reranking pass for improved search quality
  • Per-database access control — Granular read/readWrite permissions per database
  • Global user store — Users persisted in db/hive_users.json, survive restarts
  • MCP Server — Expose Hive as tools for AI agents (local stdio + remote SSE)
  • Custom models — Plug in any @xenova/transformers compatible model

Architecture

node admin.js        → Web UI + REST API + MCP remote SSE (port 4173)
node mcp.js          → Local MCP stdio (for AI assistants)
node scripts/import-folders.js  → Batch import docs/ → databases

Quick Start

# From npm
npx @deonis/hive

# Or from source
git clone https://github.com/dspasyuk/hive.git
cd hive
npm install
node admin.js

Open http://localhost:4173 — login with admin / admin.

Web UI

The admin server provides two interfaces:

Client Search UI (/search)

  • Full-text and semantic search across databases
  • Left sidebar with database tree selector
  • Upload files, paste text, search by image
  • Drag-and-drop file upload with progress
  • Result highlighting and similarity scores
  • Per-database access control (users see only their databases)

Admin Panel (/admin)

  • Database browser — view, create, drop databases
  • Entry explorer — browse entries with type filtering, pagination
  • Semantic search — multi-modal text and image search
  • User management — create users, set root access, assign per-database read/readWrite permissions
  • Entry preview — inspect metadata, content, vectors, images

Login

  • Default credentials: admin / admin
  • Users are stored in db/hive_users.json (survives restarts)
  • Root users see and manage all databases
  • Regular users only see databases they have access to

Per-Database Permissions

Instead of global roles, each user's access is defined per database:

| Access Level | Allows | |---|---| | read | Search and view documents | | readWrite | Upload, edit, delete documents; manage other users' access |

Root users (role root) have full access to everything.

Database owners can manage access for their databases directly from the search sidebar — click the users icon next to a database you own.

Import Folders

Batch-import documents from docs/ and img/ subdirectories as databases:

docs/MeetingNotes/meeting1.txt   → database "MeetingNotes"
docs/MeetingNotes/report.pdf
img/Screenshots/shot1.png        → database "Screenshots"
npm run import-folders

Each subdirectory becomes a database named after the folder. Top-level files in docs/ go into the Main database.

API

| Method | Description | |--------|-------------| | Hive.init(options) | Initialize the database | | Hive.embed(input, type) | Generate a vector embedding | | Hive.find(query, topK) | Vector similarity search | | Hive.addFile(filePath) | Add a file (auto-detects text/image) | | Hive.removeFile(filePath) | Remove file entries | | Hive.insertOne(entry) | Insert a document | | Hive.insertMany(entries) | Bulk insert | | Hive.deleteOne(id) | Delete by ID | | Hive.updateOne(query, entry) | Update a document |

Hive.init(options)

| Option | Default | Description | |--------|---------|-------------| | dbName | "Documents" | Database name | | storageDir | process.cwd() | Directory for the database folder | | pathToDB | — | Full path to .bin file (overrides storageDir) | | pathToDocs | false | Directory to auto-import documents from | | watch | false | Watch directory for changes | | logging | false | Enable processing logs | | SliceSize | 512 | Token limit per chunk | | minSliceSize | 100 | Minimum tokens to index a chunk | | overlap | 5% of SliceSize | Chunk overlap (percentage < 1 or token count >= 1) | | rerank | false | Enable cross-encoder reranking | | models | — | Override embedding models ({ text, image, rerank }) |

MCP Server

Hive exposes its search and ingestion capabilities as MCP tools for AI agents (Claude, opencode, etc).

Local stdio (for AI assistants on the same machine)

npm run mcp

MCP client config:

{
  "mcpServers": {
    "hive": {
      "command": "node",
      "args": ["/path/to/hive/mcp.js"]
    }
  }
}

Tools: hive_init, hive_find, hive_add_file, hive_embed

Remote SSE (built into admin server)

The admin server includes an MCP SSE endpoint at http://host:4173/mcp/sse — no extra process needed.

MCP client config:

{
  "mcpServers": {
    "hive": {
      "url": "http://your-server:4173/mcp/sse"
    }
  }
}

Remote tools require username and password parameters (validated against hive_users.json):

  • hive_find — search a database (checks read access)
  • hive_add_file — upload a file (checks write access)
  • hive_auth — verify credentials and list accessible databases

opencode Configuration

{
  "mcp": {
    "hive": {
      "type": "local",
      "command": ["node", "/path/to/hive/mcp.js"],
      "enabled": true
    }
  }
}

Screenshots

Client Search UI

Client Search UI

Admin Web UI

Admin Web UI

License

MIT