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

@vyr-e/mongo-vfs

v0.1.1

Published

just-bash filesystem backed by MongoDB for coding agents — bash explores, searchReplace and applyPatch send only what changed

Readme

@vyr-e/mongo-vfs

A just-bash IFileSystem backed by MongoDB, built for coding agents. Bash is how an agent explores; searchReplace and applyPatch are how it edits — sending only what changed instead of rewriting whole files, with every write in a transaction.

bun add @vyr-e/mongo-vfs

Usage

import { Bash } from "just-bash";
import { MongoFs, mongoBashDefense } from "@vyr-e/mongo-vfs";

const fs = await MongoFs.open("mongodb://127.0.0.1:27017", {
  db: "vfs",
  workspace: "demo",
});
const bash = new Bash({ fs, cwd: "/", defenseInDepth: mongoBashDefense });
await bash.exec("echo 'hello' > /src/main.py");
await fs.searchReplace("/src/main.py", "hello", "goodbye"); // sends old + new, not the file

Connecting

Pass a URI (with optional driver options), your own MongoClient or Db — or your app's mongo util, and the filesystem awaits it once at open:

MongoFs.open(getDb, { workspace: "demo" });                         // async () => Db — your util, as-is
MongoFs.open(() => client, { db: "vfs", workspace: "demo" });       // shared client, never closed by the fs
MongoFs.open(uri, { db, workspace, mongoOptions: { tls: true } });  // dedicated client + your driver config

A URI gets a dedicated client that close()/destroy() close; anything you supply (client, Db, or a factory returning one) is only used, never closed — your app owns the connection. Local URIs get replicaSet=rs0 appended automatically; Atlas and other managed clusters pass through untouched.

Shape

  • Every write is a multi-document transaction; stale edits are a conflict, not a silent overwrite.
  • Files over 64 KiB split into content-defined chunks, so an edit re-chunks only the region it touches and unchanged spans stay shared across files and workspaces.
  • A file_ops change stream keeps other MongoFs instances current — another agent process, a sandbox writing results back. watch: false for single-process use.
  • deny: denySubtrees(["/.env"]) blocks paths inside the filesystem, after resolution — symlinks and shell quoting cannot route around it.
  • scripts/measure.ts puts a number on the cheap write: a 76-byte searchReplace where bash redirection sends the whole 51 KB file.

Development

bun install && bun run test

The suite expects a local single-node replica set (VFS_MONGO_URI to override): docker run -d --name vfs-mongo -p 127.0.0.1:27017:27017 mongo:7 --replSet rs0, then rs.initiate().