- 版本
- v0.1.44
- 发布日期
- 2026-12-02
- 平台
- macOS
- 安装包大小
- macOS 19.2 MB
- 发布者
- pierre-borckmans
clove
A ready git worktree in ~1s, with node modules , the dev shell and every other ignored file already there.
README
clove
A ready git worktree in ~1s, with node_modules, the dev shell and every other ignored file already there.
clove.fast, with a video and the docs.
$ clove new feat/login
+ feat/login
✓ clone image 0.00s
✓ mount 0.70s
✓ checkout 0.21s
✓ setup mise-trust 0.02s
✓ setup direnv-allow 0.02s
· setup direnv unchanged since golden
· setup pnpm unchanged since golden
● feat-login ready in 1.0s ~/src/mono.clove/feat-login/mono
| On a ~35k-file monorepo | git worktree add + setup |
clove new |
|---|---|---|
| Time to a usable checkout | ~70s | ~1s |
| New disk per worktree | a few GB | ~6 MB |
~1s is a cold clone, mount included. On macOS clove keeps one clone mounted ahead of time, so the next clove new skips the mount: 61 ms on the benchmark repo.
The desktop app and the terminal UI show the same things, and the CLI does it all too.
Recorded on Linux (btrfs) with a small demo repo. On macOS, a cold clone of a big monorepo takes about a second.
More recordings: checkpoint and rewind, the trash, ls and ps



Install
brew install pierre-borckmans/tap/clove # CLI and terminal UI, macOS and Linux
brew install --cask pierre-borckmans/tap/clove-app # desktop app with a menu-bar popover, macOS
clove shell-init --install # cd into new clones, completions (zsh, bash, fish)
Quick start
In a repository:
clove init # shows what it will set up, then builds the golden image (once)
clove new feat/login # a ready worktree on that branch
clove service install # remount clones at login, keep golden images fresh
clove agents install # teach Claude Code, Codex, OpenCode and Pi to use clove (optional)
Other ways to install
The desktop app on Linux (x86_64 and arm64): a .deb and an AppImage are on the releases page. It runs the CLI for the background service, so install that too.
sudo apt install ./clove-app-v<version>-x86_64.deb # Debian, Ubuntu
chmod +x clove-app-v<version>-x86_64.AppImage # anywhere else; needs libfuse2
Without Homebrew:
- npm:
npm i -g @pborck/clove, ornpx @pborck/clove. Same binaries as the releases;clove upgradeonly handles Homebrew, so upgrade with npm. - Prebuilt binaries for macOS and Linux are on the releases page. The macOS ones are signed and notarized.
- From source:
cargo install --git https://github.com/pierre-borckmans/clove clove-cli
Requirements
macOS
- APFS, the default filesystem.
- Tested on macOS 26, which has ASIF disk images.
- Older versions fall back to
hdiutilsparse images: implemented, but untested.
Linux
btrfs-progs(sudo apt install btrfs-progs,sudo pacman -S btrfs-progs), a kernel with btrfs and loop devices. The host disk can be any filesystem.Kernel 6.7+ gives exact clone sizes (simple quotas). Older kernels use full qgroups, or report no sizes.
clove initoffers to add one line to/etc/fstab, with sudo, once per repo:~/.clove/repos/<repo>-<hash>/pool.btrfs ~/src/<repo>.clove btrfs loop,user,noauto,exec,user_subvol_rm_allowed 0 0How clove mounts the repo's image, in order of preference (
clove doctorsays which one a repo uses):- With that fstab line: as you, at
<repo>.clove, from a desktop or over SSH. - Without it, through udisks2 if installed: only from a desktop session, with clones under
/run/media/$USER/(or/media/$USER/). sudo -nas a last resort.
- With that fstab line: as you, at
On WSL with Docker Desktop, run
clove config set clone_root '/mnt/wsl/clove/{repo}'beforeclove init. Docker Desktop sees only mounts under/mnt/wsl, so elsewhere a container shows a clone as an empty folder./mnt/wslis cleared when WSL restarts, and clove makes the folder again on the next mount.clove doctorwarns when the setting is missing.
Why
git worktree addgives you the tracked files and nothing else. On a monorepo with ~35k files, ~4.5k npm packages and a nix flake dev shell, a fresh worktree takes ~70s before anything runs:- ~40s for direnv to evaluate the flake
- ~30s for
pnpm install --offline - a few GB of new files
- Copying the ignored files over doesn't scale with file count. worktrunk's
copy-ignoredandcp -c -Rcopy-on-write file by file (more in prior art). That saves disk, but time grows with the number of files: that repo's ~550k ignored files take minutes, andclonefileon the rootnode_modulesalone takes ~15s. - clove copies one disk image instead of half a million files, so the cost doesn't depend on how many files the repo has.
How it works
- One golden image per repo: a worktree of the base branch, with dependencies installed and dev environments warmed.
- A clone is a copy-on-write copy of it, registered as a regular git worktree with a copy of the golden index. Inodes and timestamps are kept, so git rehashes nothing.
- Then only what changed runs: clove checks out your branch and reruns the setup steps whose inputs changed since the golden commit. Same lockfile, no
pnpm install. - Clones are isolated. Adding a dependency or editing the nix flake in one doesn't affect the others.
- Normal tools work inside a clone: file watchers, Docker bind mounts, Go and Rust builds.
Under the hood on macOS and Linux
macOS
The golden image is an APFS volume in a disk image file. clove new:
- copies the image file with
clonefile(2): one syscall whatever is inside, and no disk used until something is written - mounts the copy as its own volume (~0.7s)
- registers the worktree and runs the changed steps
On the monorepo above: ~1.1s and ~6 MB of disk per clone. clove init took ~1m20s, once.
Linux
- Each repo has one btrfs image file, mounted once.
- The golden worktree is a subvolume in it, and a clone is a snapshot of that subvolume, so there's no mount per clone.
- On a ~185k-file golden: the snapshot takes ~8 ms, and the first
git statusin the clone ~50 ms, with no rehash.
More in internals.
Features
Clones
- Any branch or PR, ready in ~1s:
clove new feat/x,clove new pr:123, or-x claudeto start an agent in it. → Commands - Checkpoints, rewind and fork: freeze a clone in ~0.05s, put it back in ~1.5s, or fork it with its uncommitted state. → Checkpoints
- Each clone knows who it is:
CLOVE_ID,CLOVE_BRANCHand aCLOVE_PORT_OFFSETof its own keep dev servers anddocker composeprojects apart;teardowncleans up on removal. → Clone identity - Updates and renames:
clove updaterebases and reruns only the changed steps;clove renamemoves folder, image and branch. → Updating, renaming - Groups: file clones under a name (
clove group feat-a feat-b billing,clove new --group billing) and the list and the map show them together. clove suggests groups from branch names, and never applies them by itself. → Groups - Next to plain git worktrees: lists them, removes them safely, or adopts them as clones. → Plain git worktrees
Coding agents
- One command sets up Claude Code, Codex, OpenCode and Pi to use clones, native worktrees included, and keeps that setup current across upgrades. → Coding agents
- Agent sessions linked to their clone: read one as a conversation, follow a live one, or resume it. → Agent sessions
- PRs that need attention: failing checks, requested changes and conflicts show on the clone, and the agent that owns it hears about them, and about the merge. → PRs
- Sees what runs in a clone: shells, dev servers, editors and agents, with their ports; removing a clone stops them first. → Processes
Cleanup
- Cleans up after merged PRs, squash merges included, by hand or on its own, with a history to get any branch back. → Cleaning up
- Closes PRs you give up on:
clove closecloses the PR on GitHub, trashes the clone, and deletes its branch here and on the remote, unless someone pushed to it since. → Closing a PR - Removed clones go to a trash for a day;
clove restorebrings one back with its uncommitted files and checkpoints. → The trash - Leaving is one command:
clove deinit --allremoves every clone, the trash and the golden image, and refuses while a clone holds unsaved or unpushed work. The checkout and its branches stay. → Stop using clove - Disk usage that counts shared blocks once:
clove dusplits a repo's disk into the golden image, each clone's own bytes, checkpoints, the spare and the trash, says what removing each frees, and shows what a clone holds by folder. → Disk usage
Setup
- Detects your toolchain: mise, direnv + nix, pnpm, bun, yarn, npm, de


