Skip to Content
🚀 Legit SDK Alpha preview – help shape it on Discord here.

Overview

The Legit SDK has two layers:

  1. Legit SDK API – top-level API like initLegitFs() that help you initialize a versioned filesystem.

  2. Legit FS API – once you have a LegitFS file system instance, you can use its .promises API just like Node’s fs. Any file you write is automatically tracked and versioned in .legit. You can read files, inspect history, or check out previous versions.

Key points:

  • The SDK API help you bootstrap and manage the repo.
  • The FS API is where you read/write files, inspect commits, and interact with history.
  • Because LegitFS mimics the Node.js fs.promises interface, it’s compatible with in-memory or real filesystems, and portable across environments (Node, Docker, Python, Java, etc.).
Last updated on