> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Versioned File Systems

> Git repositories that mount as directories, checkpoint with snapshots, and promote changes back to branches.

Versioned File Systems are Git repositories that mount as ordinary directories. Agents can read and write files in a sandbox, snapshot their work, and publish finished changes back to a branch.

The repository stays the source of truth. After promotion, future agents that use the branch and Git users who clone or fetch it get the published version.

Use versioned file systems when applications need a fast directory interface, but your product still needs Git history, branches, and reproducible versions.

<img src="https://mintcdn.com/tensorlake-35e9e726/nq8YhtvAhQjxPmqU/images/git_repo.png?fit=max&auto=format&n=nq8YhtvAhQjxPmqU&q=85&s=c9a9a2a9a558d0d9bb5b75833af1a19f" alt="Git Repository Dashboard" width="1600" height="894" data-path="images/git_repo.png" />

## Quickstart

Install the Tensorlake CLI and sign in:

```bash theme={null}
curl -fsSL https://tensorlake.ai/install | sh
tl login
```

Then create a repository, mount it, write a file, snapshot the change, and promote it to `main`.

<Steps>
  <Step title="Create a repository">
    ```bash theme={null}
    $ tl git create agent-outputs --default-branch main
    created https://git.tensorlake.ai/project_9f3c2a1b/agent-outputs
    ```

    The repository is an ordinary Git remote. You can use it through `tl fs` mounts or through plain `git`.
  </Step>

  <Step title="Mount a writable workspace">
    ```bash theme={null}
    $ tl fs mount agent-outputs:main /work
    Mounted agent-outputs:main at /work (workspace 3f9a2b7e1c4d)
    ```

    `/work` is now an ordinary writable directory. Changes stay isolated from `main` until you promote them.
  </Step>

  <Step title="Write and snapshot">
    ```bash theme={null}
    $ echo "# Parser Notes" > /work/NOTES.md
    $ tl fs snapshot /work -m "add notes"
    Snapshot 8b21f6a9c3d5e7f1a2b4c6d8e0f3a5b7c9d1e3f5 (1 file(s), 1 of 1 chunks uploaded)
    ```

    A snapshot is a commit on the workspace. It is private until promotion.
  </Step>

  <Step title="Promote to main">
    ```bash theme={null}
    $ tl fs promote /work main -m "add notes"
    Promoted workspace 3f9a2b7e1c4d -> main at 1c4d9a2f7e5b3d8c6a4f2e0d9b7c5a3f1e8d6b4c (squashed)
    ```

    After promotion, `main` contains the notes. New agents that mount `agent-outputs:main`, and anyone who clones or fetches the repository, get those files. Agents with following read-only mounts pick up the update automatically. The activity history shows who published it and which workspace it came from.
  </Step>
</Steps>

## Mental Model

The workflow is:

1. A **repository** stores the durable Git history.
2. A **workspace** gives an agent a private writable view of that repository.
3. A **mount** exposes the workspace as a directory, such as `/work`.
4. A **snapshot** checkpoints the mounted files.
5. **Promotion** publishes a snapshot to a branch so future agents and Git users can use that version.

See [Core Concepts](/filesystems/core-concepts) for short definitions of each term.

## What Tensorlake Provides

* **Plain Git repositories**: clone, branch, commit, merge, push, and fetch over Git smart HTTP.
* **Writable workspaces**: isolated agent workspaces that survive sandbox restarts and can be reattached.
* **Snapshots**: incremental checkpoints that record a workspace's file state as Git commits.
* **Promotion**: publish workspace snapshots as Git commits on shared branches, with conflict handling and activity attribution.
* **Read-only mounts**: serve a fixed commit or follow a branch across many running sandboxes.

## Use Cases

<CardGroup cols={2}>
  <Card title="Distribute Files to Agents" icon="package-open" href="/filesystems/distribute-files">
    Roll out manuals, skills, configs, and tools to many agents with versioned read-only mounts.
  </Card>

  <Card title="Store Agent-Generated Code" icon="code-branch" href="/filesystems/store-generated-code">
    Store generated apps, docs, and assets with snapshots, promotion, and activity history.
  </Card>
</CardGroup>

## Where To Go Next

<CardGroup cols={2}>
  <Card title="Core Concepts" icon="book-open" href="/filesystems/core-concepts">
    Learn the vocabulary: repositories, workspaces, mounts, snapshots, promotion, and mount modes.
  </Card>

  <Card title="File System Mounts" icon="folder-tree" href="/filesystems/filesystem-mounts">
    Choose between writable, read-only, pinned, and following mounts.
  </Card>

  <Card title="Writable Workspaces" icon="pen-line" href="/filesystems/writable-workspaces">
    Mount, snapshot, and promote agent work.
  </Card>

  <Card title="Git Repositories" icon="code-commit" href="/filesystems/git-repositories">
    Use Tensorlake repositories with ordinary Git commands.
  </Card>

  <Card title="Repository SDKs" icon="rectangle-code" href="/filesystems/repository-sdks">
    Create repositories, push worktrees, and merge branches from Python or TypeScript.
  </Card>
</CardGroup>
