Overview
The Legit SDK has two layers:
-
Legit SDK API – top-level API like
initLegitFs()that help you initialize a versioned filesystem. -
Legit FS API – once you have a
LegitFSfile system instance, you can use its.promisesAPI just like Node’sfs. 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
LegitFSmimics the Node.jsfs.promisesinterface, it’s compatible with in-memory or real filesystems, and portable across environments (Node, Docker, Python, Java, etc.).
Last updated on