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

@legit-sdk/core

v0.6.1

Published

Legit SDK - Infrastructure for write-enabled AI

Readme

Legit SDK (Alpha) - Feedback-only version

This software is being shared publicly to gather early feedback on its API and underlying concepts. It represents the first small component of our upcoming SDK. At this stage, it’s intended for evaluation and personal use only.

The easiest way to build fail-safe applications.

Legit SDK is built around two core ideas: fail-safe by design, and effortlessly simple to use.

Fail-safe means giving your users the same superpowers you know from Git:

  • Roll back to any previous state
  • Branch off to run experiments safely
  • Merge changes back when you’re happy with the result

And it's easy because you interact through the simplest interface imaginable: the file system API. Yep, the same one you learned in your first semesters of computer science.

Runs everywhere. Use Legit SDK as an API in the browser, or mount it as a folder on your machine. That means instant compatibility with the stack of your choice — Python, Java, Node.js… you name it — from day one.

Environment Compatibility

Legit SDK works in many environments:

  • Operating Systems: macOS, Linux, Windows
  • Languages: Node.js, Python, Java (more coming)
  • Containers / Sandboxed Environments: Docker, serverless, cloud VMs

It works everywhere because it operates on a filesystem abstraction. Any environment that supports standard filesystem operations can run it.

For this guide, we focus on Node.js. Later guides will cover Python, Java, and containerized usage.

First Steps

1. Install the SDK

npm install @legit-sdk/core

This package provides everything you need: creating a LegitFS instance, reading/writing files, and accessing version history.

2. Minimal Example

import { fs } from 'memfs';
import { initLegitFs } from '@legit-sdk/core';

async function main() {
  // create a LegitFS instance backed by memfs
  const legitFs = await initLegitFs(fs, '/');

  // write a versioned file
  await legitFs.promises.writeFile('/hello.txt', 'Hello world');

  // read the current file state
  const content = await legitFs.promises.readFile('/hello.txt', 'utf8');
  console.log(content); // → "Hello world"

  // inspect commit history (stored in .legit)
  const history = await legitFs.promises.readFile(
    '/.legit/branches/main/.legit/history',
    'utf8'
  );
  console.log(history);
}

main();

Notes:

  • legitFs behaves like fs, but all writes are versioned automatically.
  • You can read any previous state from the .legit folder.
  • Swapping fs in legitFs requires no other code changes.

3. How LegitFS Stores Data

LegitFS keeps track of all writes in a .legit folder:

/
├─ document.txt                   # checked-out file (working copy)
└─ .legit/
   ├─ branches/                   # available branches
   │  └─ main/
   │     ├─ document.txt
   │     └─ .legit/
   │        ├─ head               # current HEAD content
   │        ├─ history            # branch history
   │        ├─ operation
   │        └─ operationHistory
   └─ commits/
      └─ ab/                      # first 2 chars of SHA
         └─ cdef1234567890.../    # remaining 38 chars of SHA
            └─ document.txt       # snapshot of the file in that commit

Because it follows the same interface as Node’s fs:

  • You can run it in-memory, on disk, or with any other storage adapter.
  • You can access version history and snapshots without extra setup.