00OPEN SOURCE / NATIVE COPY-ON-WRITE

Git worktrees.
Shared storage.

Real, isolated Git worktrees that share the unchanged parts of your project. Keep using normal files, normal Git, and the tools you already have.

curl -fsSL https://riftri.dev/install.sh | bash
[ WORKTREE EXAMPLE ]
REPOSITORY / EXACT TREEa4d2c19

One immutable base holds the exact Git tree once. Three worktrees, auth, billing, and tests, are copy-on-write views over it. Each edit copies only the changed block into its worktree: three blocks in auth, two in billing, and one in tests. Every other block stays shared with the base.

00 immutable basea4d2c19 · read only
01 auth/ +3feature/auth
02 billing/ +2feature/billing
03 tests/ +1fix/worktree-tests
shared block private edit

One base. Independent worktrees. Only edits diverge.

Native storage on supported volumes

  • macOS APFS
  • Linux reflink / OverlayFS
  • Windows ReFS
01STORAGE MODEL

How Riftri stores linked worktrees

Riftri changes how worktree files are created and stored. It does not replace Git, manage branches, or sit between your tools and the filesystem.

[ FROM TREE TO WORKSPACE ]
  1. 01Exact Git treea4d2c19
  2. 02Immutable basereuse or create
  3. 03Native copy-on-write view. APFS clone on macOS, Linux reflinks and mount-capable OverlayFS, and Windows ReFS block clones are available on supported volumes.
  4. 04Linked worktreeclean + writable
GIT OWNS THE WORKTREE RIFTRI EXITS AFTER CREATION
01

Real Git worktrees

Branches, commits, hooks, and status remain owned by Git.

02

Shared unchanged data

Native copy-on-write backends share unchanged data; edits stay private.

03

No filesystem proxy

Editors, builds, and agents read and write the native filesystem directly.

02MEASURED SAVINGS

Worktree disk usage

New disk allocation for ten assistant-ui worktrees, using the same tracked source in both comparisons.

[ ASSISTANT-UI / DISK ALLOCATION ]
10 WORKTREES / 5,346 FILES EACH

APFS reference measurement · new volume allocation

Ordinary Git10 full checkouts
774.01 MiB
Riftri / APFS on macOS, native reflinks on Linux, and ReFS on Windows. The chart shows the APFS reference measurement.10 views + shared base
100.62 MiB
LESS NEW ALLOCATION87.0%

673.39 MiB saved

Includes the shared base and all ten views.

Source files only on APFS. Dependencies and builds excluded.

Read full benchmark
03QUICK START

Create a Riftri worktree

Install the CLI, then run the support check from a Git repository. Riftri stops unless a supported native storage backend is available.

  1. 01
    Install the CLI

    Downloads the native CLI and verifies SHA-256. No Node.js required.

    macOS / Linux

    curl -fsSL https://riftri.dev/install.sh | bash
    Windows / PowerShell

    Download the installer and review its contents.

    $Installer = Join-Path $env:TEMP 'riftri-install.ps1' Invoke-WebRequest https://riftri.dev/install.ps1 -OutFile $Installer Get-Content $Installer

    After reviewing, run it in the same PowerShell session:

    & $Installer

    Installs per user; follow its printed PATH command. Optimized worktrees require a ReFS volume, not ordinary NTFS. No administrator access is needed to install the CLI.

  2. 02
    Check support

    Doctor is read-only and explains blockers before anything changes.

    riftri doctor --destination ../app-auth
  3. 03
    Create a worktree

    Start with the explicit, debuggable interface.

    riftri worktree add ../app-auth -b feature/auth main

Installs to ~/.local/bin. Follow the printed PATH command before step 02. Shell profiles and Git activation stay unchanged. Linux supports glibc and musl.

04FAQ

Common questions

Where Riftri fits, what it saves, and what stays in your control.

Ask a question
Why use Riftri if I can ask an agent to make a COW copy?

A copy-on-write (COW) copy can work well if you already handle Git setup and cleanup yourself. Riftri gives you a repeatable way to create real Git worktrees, reuse a verified base from an exact Git tree, check storage support, and recover interrupted operations. You get those checks every time, without relying on an agent to remember each step.

For a small project or an occasional copy, your existing approach may be enough. Riftri is useful when you create and retire worktrees regularly.

Are these real Git worktrees?

Yes. Git registers each worktree with its own HEAD and index, while repository history is shared. Your usual Git commands, editor, and build tools still work. Riftri handles how the checkout files are stored; ordinary reads and writes go directly through the native filesystem.

What disk space does it actually save?

Compatible worktrees starting from the same Git tree share the unchanged tracked file data through one immutable base. Edits allocate private storage. Dependencies such as node_modules, build output, caches, and Git metadata still take space. Savings depend on the workload and filesystem; summing directory sizes can count shared blocks more than once. See the measurements and their limits.

Is it faster than ordinary Git?

Not always. The first worktree needs a base to be built, and cached worktrees still go through integrity and Git checks. Our published APFS experiment used much less additional disk space but took longer to create the worktrees. Expect storage savings on compatible workloads, not a guaranteed speedup.

Does my coding agent need special integration?

You can create a worktree with Riftri and point any agent at its directory. For normal Git command interception, run riftri enable in the repository, then launch your agent with riftri exec -- claude(or another command). Tools that call Git through PATH inherit the shim. Tools using their own Git library or an absolute Git path bypass it. See agent setup.

Does enabling Riftri change Git everywhere?

No. riftri enable opts in one repository. Interception also needs an activated shell hook or riftri exec. Even a hook in your shell profile leaves other repositories on ordinary Git, and existing worktrees are not converted. Use riftri shell status to check the scope and riftri disable to opt the repository out. See activation and deactivation.

Will it work on my machine and repository?

Optimized worktrees need APFS on macOS, Btrfs or reflink-enabled XFS on Linux, or ReFS on Windows. Linux can also use OverlayFS when mount permissions or Riftri’s explicitly installed helper allow it. Ordinary NTFS is not supported.

Run riftri doctor --destination ../app-auth from your repository first. Some checkout settings are unsupported, and Riftri stops with an explanation instead of silently making a full copy. Keep important work committed or backed up.

What happens after a crash, and how do I clean up?

Riftri records lifecycle progress in durable journals. riftri repair uses them to recover interrupted operations and preserves changed or ambiguous state for inspection. riftri status shows what is retained.

Use riftri worktree remove <path> for a finished, clean worktree. Its base stays cached for reuse. riftri gc previews unused-base cleanup; only riftri gc --apply deletes eligible bases. Cleanup is explicit, and dirty work is not automatically discarded.

Can one agent’s edits affect another worktree?

Writes through one worktree’s files stay private; they do not update the shared base or a sibling worktree. That isolation is not a security sandbox. An agent with permission to access another directory can still edit it directly, and Git branches and history belong to the shared repository. Use a container or VM when you need to isolate untrusted code.