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

@dotdo/fsx

v0.1.4

Published

Pure POSIX filesystem implementation in TypeScript. Zero dependencies. Self-hostable. FsBackend interface for pluggable storage.

Downloads

152

Readme

@dotdo/fsx

POSIX filesystem implementation in TypeScript. Pure logic. Zero dependencies. Self-hostable.

npm version TypeScript License: MIT

What is this?

The filesystem logic without the infrastructure. All POSIX operations, path handling, glob patterns, grep, find - implemented in pure TypeScript with no Cloudflare dependencies.

Bring your own storage backend. Run anywhere JavaScript runs.

import { MemoryBackend, readFile, writeFile, mkdir } from '@dotdo/fsx'

const backend = new MemoryBackend()

await mkdir('/data', { backend })
await writeFile('/data/config.json', '{}', { backend })
const content = await readFile('/data/config.json', { backend })

Installation

npm install @dotdo/fsx

Architecture

@dotdo/fsx
├── types.ts        # FileEntry, Stats, Dirent, FsCapability
├── errors.ts       # ENOENT, EEXIST, EISDIR, ENOTDIR, etc.
├── constants.ts    # S_IFREG, S_IFDIR, O_RDONLY, etc.
├── path.ts         # normalize, join, resolve, dirname, basename
├── backend.ts      # FsBackend interface + MemoryBackend
├── fs/             # POSIX operations (readFile, writeFile, stat, etc.)
├── glob/           # Pattern matching (*.ts, **/*.json)
├── grep/           # Content search
├── find/           # File discovery
└── cas/            # Content-addressable storage

FsBackend Interface

Implement this interface to add your own storage:

import type { FsBackend, Stats, Dirent } from '@dotdo/fsx'

class MyStorageBackend implements FsBackend {
  async readFile(path: string): Promise<Uint8Array> { ... }
  async writeFile(path: string, data: Uint8Array): Promise<void> { ... }
  async stat(path: string): Promise<Stats> { ... }
  async readdir(path: string): Promise<string[] | Dirent[]> { ... }
  async mkdir(path: string): Promise<void> { ... }
  async unlink(path: string): Promise<void> { ... }
  async rename(old: string, new_: string): Promise<void> { ... }
  async copyFile(src: string, dest: string): Promise<void> { ... }
  // ... full interface in backend.ts
}

Built-in backends:

  • MemoryBackend - In-memory filesystem for testing

Submodule Exports

// Core types and errors
import { FileEntry, Stats, ENOENT, EEXIST } from '@dotdo/fsx'

// Path utilities
import { normalize, join, resolve, dirname, basename } from '@dotdo/fsx/path'

// Glob patterns
import { glob, minimatch } from '@dotdo/fsx/glob'

// Grep (content search)
import { grep, grepFile } from '@dotdo/fsx/grep'

// Find (file discovery)
import { find } from '@dotdo/fsx/find'

// Content-addressable storage
import { sha256, compress, decompress } from '@dotdo/fsx/cas'

POSIX Compatibility

Full POSIX semantics:

| Operation | Status | |-----------|--------| | readFile / writeFile | Complete | | stat / lstat | Complete | | readdir | Complete with Dirent | | mkdir / rmdir | Complete with recursive | | unlink / rename | Complete | | chmod / chown | Complete | | symlink / readlink | Complete | | link (hard links) | Complete | | utimes | Complete | | access | Complete |

Want a managed service?

fsx.do is the managed service built on @dotdo/fsx:

  • Durable Object integration
  • Tiered storage (SQLite + R2)
  • CLI: npx fsx.do ls /
  • SDK: import { fs } from 'fsx.do'
  • HTTP API
  • File watching
  • Content streaming
// fsx.do re-exports everything from @dotdo/fsx
import { glob, grep, find, MemoryBackend } from 'fsx.do'

License

MIT

Links