Rift: A Better Alternative to Git Worktrees with Instant Copy-on-Write Snapshots

Rift is a command-line tool and JavaScript FFI library that replaces Git worktrees with instant, copy-on-write snapshots. On Linux, it uses btrfs subvolumes and snapshots; on macOS, APFS clonefile. A 10GB workspace snapshot takes under 0.1 seconds.
Installation
npm install -g rift-snapshot
# or
bun add -g rift-snapshotRelease archives are available on GitHub.
Supported Platforms
- Linux x64: Writable btrfs snapshots.
rift initconverts an ordinary directory into a btrfs subvolume. - macOS arm64 / x64: APFS clonefile.
rift initregisters the source directory. - Windows x64: Package published but workspace creation not yet implemented.
CLI Usage
Initialize in your project root:
cd ~/code/app
rift initrift init picks the nearest Git root. Use --here to force the exact directory. On Linux, it converts to a btrfs subvolume with reflink import.
Create a workspace snapshot:
rift create --name parser-fix
rift create --into /fast/riftsThe new workspace has detached HEAD in a Git repo, preserving index and working tree.
List and manage:
rift list
rift ancestors
rift remove
rift gcrift remove moves the workspace to an adjacent .trash folder. rift gc physically deletes trashed data.
Shell Integration
eval "$(rift shell-init zsh)"
# or bashThis changes directory automatically after init, create, or remove.
Storage Layout
~/code/app/ # source workspace
~/code/.rifts/app/parser-fix/ # created workspace
~/code/.rifts/app/.trash/ # removed workspaceEach managed workspace has a .rift marker; an SQLite registry tracks paths and parents.
JavaScript API
Supports Bun and Node.js (requires Node 26.1+ with --experimental-ffi).
import { create, list, remove, gc } from 'rift-snapshot';
const workspace = create({ from: process.cwd(), name: 'schema-work' });
console.log(list({ of: process.cwd() }));
remove({ at: workspace });
gc();
Functions: init, create, remove, list, ancestors, gc. Options include at, name, into, database.
Rift is experimental — APIs may change. Works on Linux and macOS only for now.
📖 Read the full source: HN LLM Tools
👀 See Also

SpecLock: MCP Server for Enforcing AI Coding Constraints
SpecLock is an open-source MCP server that remembers project constraints across sessions and blocks AI coding agents from violating them. Claude independently tested it with 100 adversarial tests, scoring 100/100 with zero false positives and 15.7ms per check.

Claude Code Logs Every Session to Disk — Here's How to Index and Recall Them
Claude Code writes every session turn to ~/.claude/projects/ as JSONL. One user indexed 1026 sessions (57MB, 76K turns) into SQLite+FTS5 with an MCP server for search and thread recall across sessions.

OpenClaw as Infrastructure-as-Code Interface for Home Lab Management
OpenClaw transforms from AI gadget to primary computer interface for home lab management, executing tasks like configuring Traefik containers, creating Dashy configurations, and setting up Tailscale access with direct machine access.

Local AI Development with Qwen3.6-27B and Opencode on a 5090
A Reddit user shares their experience switching from cloud AI coding tools (Claude Code, Cursor) to a local setup using Opencode + llama-server + Qwen3.6-27B at 128K context on a single RTX 5090, citing freedom from usage limits and account risks.