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

@moss-dev/moss-web

v1.0.0

Published

Moss browser SDK — in-browser semantic search powered by WASM

Readme

Moss client library for the browser

@moss-dev/moss-web enables private, in-browser semantic search — no server round-trips for queries.

Built on WebAssembly for near-native performance in any modern browser.

Features

  • In-Browser Vector Search — Sub-millisecond retrieval with zero network latency
  • Semantic & Hybrid Search — Beyond keyword matching
  • Multi-Index Support — Manage multiple isolated search spaces
  • Full CRUD — Create, update, and delete indexes and documents from the browser
  • Privacy-First — Queries run entirely in the browser, no data leaves the device

Installation

npm install @moss-dev/moss-web

Quick Start

import { MossClient } from "@moss-dev/moss-web";

// Initialize client (WASM/model download happens automatically on first use)
const client = new MossClient("your-project-id", "your-project-key");

// Create an index with documents
await client.createIndex("knowledge-base", [
  { id: "1", text: "Machine learning fundamentals" },
  { id: "2", text: "Deep learning neural networks" },
]);

// Load the index into browser memory for fast local queries
await client.loadIndex("knowledge-base");

// Query — runs entirely in-browser
const results = await client.query("knowledge-base", "AI and neural networks");
results.docs.forEach((doc) => {
  console.log(`${doc.id}: ${doc.text} (score: ${doc.score})`);
});

API

Creating a Client

// Simple: lazy initialization (WASM/model loads on first API call)
const client = new MossClient(projectId, projectKey, options?);

// Alternative: eager initialization (WASM/model loads immediately)
const client = await MossClient.create(projectId, projectKey, options?);

Options:

  • model"moss-minilm" (default, fast, for most use-cases) or "moss-mediumlm"
  • baseUrl — Custom API base URL (for self-hosted Moss instances)

Index Management

// Create index with documents
await client.createIndex(name, docs, options?);

// Create index from files
await client.createIndexFromFiles(name, files, options?);

// Add or update documents
await client.addDocs(name, docs, options?);

// Delete documents by ID
await client.deleteDocs(name, docIds, options?);

// Get index metadata
await client.getIndex(name);

// List all indexes
await client.listIndexes();

// Delete an index
await client.deleteIndex(name);

// Get documents from an index
await client.getDocs(name, options?);

// Check job status for async operations
await client.getJobStatus(jobId);

Local Search

// Load index into browser memory for querying
await client.loadIndex(name, options?);

// Check if index is loaded locally
await client.hasIndex(name);

// Get local index info
await client.getIndexInfo(name);

// Query loaded index (runs in-browser)
await client.query(name, queryText, options?);

// Refresh index from server
await client.refreshIndex(name);

// Unload index from browser memory
await client.unloadIndex(name);

Cleanup

client.dispose();

License

See LICENSE.