# streamich/memfs

Node.js "fs" and browser "File System API" adapters and in-memory implementations 👍

Repository: https://github.com/streamich/memfs
Canonical: https://ross.abutalabs.com/products/memfs
Homepage: https://jsonjoy.com/libs/memfs
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: fs, memfs, memory, in-memory, filesystem, cas, crud, file, fsa, node, opfs, browserfs, webfs, file-system
Last push: 2026-08-10T13:01:54+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 97, release rhythm 85, longevity 100
- inputs: {"age_days": 4097, "days_push": 23, "days_rel": 23, "gap_med": 0, "n_releases_24m": 96}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2089, forks 150 (observed 2026-08-28T04:06:12.267254+00:00)

## What it is
memfs is a TypeScript library providing in-memory implementations of the Node.js `fs` module API and the browser File System Access API, plus adapters between the two. It lets code that expects a real filesystem run against a virtual one in tests, browsers, or sandboxed environments.

## Use cases
- mock the node fs module in unit tests
- run node fs code in the browser
- use an in-memory filesystem for jest tests
- adapt between node fs and File System Access API
- test file-watching logic without touching disk
- snapshot and print virtual directory trees

## When to choose
- you need to unit-test code that reads/writes files without hitting the real disk
- you want to run Node-style fs code in a browser or sandboxed environment
- you need fs/File System Access API interop adapters or OPFS file watching

## When to avoid
- you need a persistent on-disk filesystem
- you need POSIX-perfect semantics like real permissions or hard links
- your project is not JavaScript/TypeScript

## Facets
- artifact type: library
- maturity: active
- function: file-system, testing, developer-tools
- domain: developer-tools, files, testing, web-development
- platform: browser, cross-platform
- tags: in-memory-filesystem, fs-mock, opfs, file-system-access-api, typescript, fs-adapters, nodejs, javascript

## Member repositories
- streamich/memfs (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:12.267254+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:55:40.023564+00:00, confidence not recorded.
  - readme: https://github.com/streamich/memfs (fetched 2026-08-28T04:06:12.267254+00:00, sha 57e796d6ceab)
  - homepage: https://jsonjoy.com/libs/memfs (fetched 2026-08-29T10:35:47.504142+00:00, sha 3a190d979192)
- Data as of 2026-08-30T08:39:29.467469+00:00.
