SBoudrias/mem-fs

Simple in-memory vinyl file store.

TypeScript

128

572 commits

updated Oct 3, 2026

See the code

README

mem-fs

In-memory file storage and editing utilities for code generators and project scaffolding tools.

This repository publishes two packages:

  • mem-fs: a vinyl-backed in-memory file store.
  • mem-fs-editor: high-level read, write, copy, template, and commit helpers built on top of mem-fs.

Install

npm install mem-fs mem-fs-editor

Usage

import { create as createStore } from 'mem-fs';
import { create as createEditor } from 'mem-fs-editor';

const store = createStore();
const editor = createEditor(store);

editor.write('package.json', JSON.stringify({ type: 'module' }, null, 2));
editor.copyTpl('templates/index.js.ejs', 'src/index.js', {
  name: 'my-app',
});

await editor.commit();

mem-fs tracks file objects in memory. mem-fs-editor mutates that store and commits pending changes to disk when commit() runs.

SBoudrias/mem-fs

Simple in-memory vinyl file store.

TypeScript

128

572 commits

updated Oct 3, 2026

See the code

README

mem-fs

In-memory file storage and editing utilities for code generators and project scaffolding tools.

This repository publishes two packages:

  • mem-fs: a vinyl-backed in-memory file store.
  • mem-fs-editor: high-level read, write, copy, template, and commit helpers built on top of mem-fs.

Install

npm install mem-fs mem-fs-editor

Usage

import { create as createStore } from 'mem-fs';
import { create as createEditor } from 'mem-fs-editor';

const store = createStore();
const editor = createEditor(store);

editor.write('package.json', JSON.stringify({ type: 'module' }, null, 2));
editor.copyTpl('templates/index.js.ejs', 'src/index.js', {
  name: 'my-app',
});

await editor.commit();

mem-fs tracks file objects in memory. mem-fs-editor mutates that store and commits pending changes to disk when commit() runs.

Project health

Overall

6.1/10

Maintained

10/10

Code review

6/10
OpenSSF Scorecard

Latest release

6.0.0 · Aug 24, 2026

Releases this year

5

Significant stargazers

Arthur Verschaeve

1,596 followers · starred Jul 2015