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

omnifs

v0.1.0

Published

Rust-backed filesystem discovery engine for Node.js focused on streaming traversal, incremental rescans, and scalable directory indexing.

Downloads

107

Readme

# OmniFS


🏗️ Architecture & Intent

omnifs is a low-level filesystem engine designed to bridge the performance gap between Node.js and native system calls. By offloading recursive traversal, glob filtering, and hashing to a multi-threaded Rust core via napi-rs, it reduces pressure on the Node.js event loop during large traversal workloads and minimizes garbage collection overhead.

Key Capabilities

  • Parallel Traversal: Adaptive worker pooling to saturate available I/O bandwidth.
  • Ignore Semantics: Native support for recursive .gitignore hierarchy.
  • Incremental Mode: JSONL-backed indexing to skip unchanged subtrees in subsequent scans.
  • Streaming API: Async Iterator interface with backpressure-aware batching.
  • Integrity Pipeline: Optional blake3 hashing integrated directly into traversal.

⚖️ Capability Comparison

| Capability | Path Walkers | Glob Utilities | omnifs | | :--- | :---: | :---: | :---: | | Rust-Powered Engine | ❌ | ❌ | ✅ | | Async Streaming API | ⚠️ Partial | ✅ | ✅ | | Ignore-aware Traversal | ⚠️ Limited | ⚠️ Pattern-only | ✅ | | Incremental Rescans | ❌ | ❌ | ✅ | | Native Hashing Pipeline | ❌ | ❌ | ✅ | | Deterministic Ordering | ❌ | ❌ | ✅ |


📊 Performance Characteristics

omnifs is optimized for balanced throughput, low latency streaming, and stable memory usage.
Observed ranges below were measured on a ~100,000 file dataset.

Performance varies depending on filesystem type, dataset structure, CPU, and storage medium.

  • Ignore-aware Traversal: ~600–700ms total runtime.
  • Latency to First Result: ~2–5ms.
  • Memory Footprint: ~120–180MB peak RSS under sustained load.
  • Incremental Rescan: ~80ms via metadata-based subtree skipping.
  • Hashing (blake3): ~4–6s for full-content hashing across 100k files.

🚀 Usage

Installation

omnifs ships a JS wrapper plus platform-specific native binaries selected automatically at install/runtime.

npm install omnifs

Native binaries load lazily at runtime. No build step is required on supported platforms.


⚠️ Troubleshooting (Linux CI / Docker)

Some Linux CI environments skip optional native dependencies by default. If the native engine fails to load:

npm install --include=optional omnifs

If npm fails to recover optional dependencies due to lockfile state:

rm -rf node_modules package-lock.json
npm install

This resolves known npm optional-dependency edge cases in strict CI setups.

If you're using pnpm, ensure pnpm is not configured to ignore optional dependencies.


Basic Discovery

Returns an AsyncGenerator<FileMetadata>.

import { discover } from "omnifs";

for await (const file of discover("./src")) {
  console.log(`${file.path} — ${file.size} bytes`);
}

Batched Processing

import { discoverBatched } from "omnifs";

for await (const batch of discoverBatched(".", { batchSize: 512 })) {
  await Promise.all(batch.map(file => process(file)));
}

📦 Module Compatibility

omnifs works across modern Node.js module systems.

ESM

import { discover } from "omnifs";

CommonJS

const { discover } = require("omnifs");

TypeScript

import type { FileMetadata } from "omnifs";

📄 File Metadata

Each emitted entry contains:

  • path: string
  • size: number
  • mtimeMs: number
  • identity: string
  • hash?: string | null

⚙️ Configuration Options

| Option | Type | Default | Behavior | | :----------------- | :---------------------------------------- | :---------- | :---------------------------------------- | | patterns | string[] | [] | Glob include patterns. | | respectGitignore | boolean | true | Honors .gitignore rules. | | incremental | boolean | false | Enables change detection. | | hash | "blake3" \| false | false | Enables hashing pipeline. | | mode | "auto" \| "crawl" \| "glob" \| "ignore" | "auto" | Traversal strategy. | | fastPath | "auto" \| "glob" \| "none" | "auto" | Enables glob fast-path. | | fingerprinting | boolean | false* | Skip unchanged subtrees. | | forceHash | boolean | false | Hash unchanged files in incremental mode. | | deterministic | boolean | false | Stable ordering. | | batchSize | number | 256 | Adaptive batch size. | | threads | number | CPUs | Worker count. | | signal | AbortSignal | undefined | Cancellation support. |


🧩 Logical Semantics

Modes

  • auto — Default optimized path.
  • crawl — Full traversal.
  • glob — Pattern-focused mode.
  • ignore — Exclusion-focused traversal.

Hash & Incremental Rules

  • Incremental + No Hash → Metadata comparison only.
  • Incremental + blake3 → Hash changed files.
  • Standard + blake3 → Hash all emitted files.

⚠️ When NOT to use omnifs

If you only need simple glob expansion without metadata or streaming guarantees, lightweight JS glob libraries may be faster.


🛠️ Requirements & Platform Support

  • Node.js >=20
  • ESM / CommonJS / TypeScript supported
  • Linux: x64/arm64 (gnu + musl)
  • macOS: x64/arm64
  • Windows: x64/arm64

📄 License

MIT — Copyright © 2026