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

@mrplex/embedder

v0.1.4

Published

Local CPU embedding provider for mrplex's --embedder hook (bge-small-en-v1.5 via fastembed). Isolated from mrplex core so fastembed/tar stay out of the core dependency graph.

Readme

@mrplex/embedder

A ready-to-use local embedding provider for mrplex's --embedder hook. It runs bge-small-en-v1.5 (384-dim) on CPU via ONNX — no GPU, no separate service. mrplex spawns it once and keeps it resident, so the model loads a single time and each batch is one JSON line in / one JSON line out.

Why a separate package

This lives in its own package with its own package.json and lockfile so that its dependency — fastembed, and fastembed's transitive tar — never enters mrplex's core dependency graph. A plain npm install (or npm ci) at the mrplex root stays clean; you only pull these deps if you opt in to local embeddings.

Install

npm install -g @mrplex/embedder

The model (~130 MB) auto-downloads on first run and caches under ~/.cache/mrplex/embedder (or $XDG_CACHE_HOME/mrplex/embedder). Override with MRPLEX_EMBEDDER_CACHE or --cache-dir PATH.

From the mrplex monorepo (development):

cd packages/embedder && npm install

Use with mrplex

After a global install:

# Serve with the hook — every write auto-embeds.
mrplex serve --unsafe --embedder mrplex-embedder

# One-off backfill of an existing repo.
mrplex embed backfill -r notes --embedder mrplex-embedder

# Or make it ambient for every mrplex command:
export MRPLEX_EMBEDDER=mrplex-embedder
# mrplex config set-embedder mrplex-embedder   # same thing, persisted

Monorepo / local checkout (no global install):

mrplex serve --unsafe --embedder "node packages/embedder/embedder.mjs"

Different models

# Stronger, slower (768-dim).
export MRPLEX_EMBEDDER="mrplex-embedder --model fast-bge-base-en-v1.5"

# Matryoshka truncation (re-embed after changing --dim).
export MRPLEX_EMBEDDER="mrplex-embedder --dim 256"

List supported model keys:

mrplex-embedder --list-models

Flags

  • --model KEY — any fastembed model key. Default fast-bge-small-en-v1.5. Others include fast-all-MiniLM-L6-v2, fast-bge-base-en-v1.5, fast-multilingual-e5-large. Run --list-models for the full set.
  • --dim N — truncate + re-normalize each vector to N dims (for Matryoshka models). The truncation is encoded into the reported model string (<key>@<N>) so mrplex treats a dim change as a model change and re-embeds.
  • --cache-dir PATH — where ONNX model archives are stored. Default $MRPLEX_EMBEDDER_CACHE, else $XDG_CACHE_HOME/mrplex/embedder or ~/.cache/mrplex/embedder.
  • --stdio — optional no-op; stdio is the default transport (one JSON line per batch over stdin/stdout).
  • --list-models — print supported --model keys and exit.
  • --help, --version — usage and version.

Protocol

Reads { "chunks": ["…", …] } lines, writes { "vectors": [[…], …], "model": "…", "dim": N } lines. Vectors are mean-pooled and L2-normalized (unit length) so mrplex's brute-force cosine ranking is stable. A malformed input line still gets one { "error": "…" } line back so the caller never hangs.

Security note

fastembed depends on tar (used to extract the model archive it downloads from HuggingFace on first run). The pinned tar carries published advisories (GHSA-*, path-traversal / DoS classes). The exposure here is low: this is opt-in developer tooling — not part of mrplex's shipped runtime — and tar only ever processes archives fetched from HuggingFace, not attacker-supplied input. npm audit will flag this; npm audit fix --force would downgrade fastembed (breaking). Revisit if a fastembed release adopts a patched tar.