Agent-readable docs
Rift Documentation
Reference for Rift copy-on-write development workspaces: CLI commands, JavaScript FFI API, registry metadata, platform copy backends, and workspace lifecycle operations.
Pages
- OverviewWhat Rift exposes (CLI, npm package, FFI), supported platforms and backends, and the shortest path from init to create.
- InstallationInstall via npm/bun global package or Cargo build script; platform support matrix and prebuilt binary layout.
- QuickstartInitialize a source workspace, create a filtered copy-on-write child, list it, and remove it with expected stdout signals.
- Workspaces and registryManaged workspace model: ULID identity, `.rift` markers, SQLite registry schema, parent-child provenance tree, and upward resolution.
- Copy strategies and platformsPlatform-specific copy-on-write backends (btrfs subvolumes, Linux reflinks, APFS clonefile), filtered vs exact copy modes, and unsupported platforms.
- Storage layoutDefault `.rifts` sibling storage, custom `--into` paths, trash relocation naming, and central SQLite database location.
- Git integrationGit repository detection, detached HEAD behavior, marker exclusion, unsafe source states, and preserved index/working-tree semantics.
- Initialize a workspaceRun `rift init` with Git-root vs `--here` selection, btrfs subvolume conversion progress, marker restoration, and success signals.
- Create workspacesCreate child workspaces with `--name`, `--into`, filtered vs `--copy-all` copy, `--no-hooks`, random name generation, and Git preparation.
- Manage and remove workspacesList children, trace ancestors, remove created rifts to trash, unregister source roots with `-f`, `--children` mode, and `rift gc` physical deletion.
- Shell integrationInstall Bash, Zsh, or Nushell wrappers via `rift shell-init` for automatic `cd` after init, create, and remove operations.
- Postcreate hooksConfigure `.rift.toml` v1 postcreate hooks, hook environment variables, sequential execution, and failure behavior after workspace registration.
- CLI referenceAll `rift` subcommands, flags, defaults, stdout/stderr behavior, hidden `--database` and `--shell-cwd` flags, and exit codes.
- JavaScript API reference`rift-snapshot` exports, Bun vs Node conditional bindings, FFI request protocol, function signatures, and Node.js 26.1+ FFI requirements.
- Configuration reference`.rift.toml` schema: `version`, `hooks.postcreate` array, validation rules, and CLI/API hook skip flags.
- Error codesComplete `RiftError` code catalog from FFI and TypeScript bindings, CLI user-facing messages, and path-bearing error variants.
- TroubleshootingCommon failure modes: uninitialized workspaces, missing markers, CoW unavailable, unsafe Git state, hook failures, and platform limitations.
- DevelopmentBuild and test the Rust workspace, install the CLI locally, CI test matrix, and filesystem integration test environment variables.
- BenchmarkingMeasure `rift create` performance with `create` and `compare` Cargo benches, sample counts, JSON output schema, and candidate comparison workflow.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.