À propos
Copy-on-write git worktrees with dependencies already installed
Outils de développementProgression mesurée des étoiles
- in 24h
- +1
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalclove
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, deno, uv, Poetry, PDM, Bundler, Composer, Go, Gradle, Maven, .NET, Dart/Flutter, Mix, SwiftPM, CocoaPods, Zig and cargo, in nested projects at any depth (workspace members are left to their workspace), plus your own steps, which can replace a detected one by name, and files like
.env. → Configuration - Stays fresh on its own: refreshes only when a step's inputs change on the base; a running refresh shows its steps live everywhere (
clove refresh --followattaches to one) and can be cancelled. → Staying fresh - Learns the steps you're missing:
clove suggestfinds the installs, builds and codegen agents kept running by hand in fresh clones, and turns them into[[add_step]]entries with their evidence. → Setup suggestions - CLI, terminal UI and desktop app with the same features,
--jsonon every command, and a shell integration that loads each clone's environment. → Interfaces, shell integration - Clones on another computer: the app,
clove on lab lsand the terminal UI drive clove on a Linux box or another Mac over ssh;clove machines installsets clove up there. → Other machines - Repos in your order: drag them in the app's sidebar, press
()in the terminal UI, or runclove repos move web 1. All three list them the same way. → Interfaces
Also: limits, internals, and every command, flag and setting generated from the code: commands reference, configuration reference.
FAQ
How do I run several Claude Code or Codex agents in parallel on one repo?
Give each agent its own clone.
clove new feat/x -x claudemakes one and starts Claude Code in it. Afterclove agents install,claude --worktreeand Claude Code's subagent worktrees become clones on their own, and Codex, OpenCode and Pi get instructions to use clones. Clones are isolated: one agent's installs, builds and edits don't touch the others. → Coding agents
Why not plain git worktree add?
It checks out the tracked files and nothing else, so every new worktree reinstalls
node_modules, rebuilds its dev shell and needs its.envagain. On a ~35k-file monorepo that is ~70s and a few GB per worktree. clove clones a golden image where that work is already done: ~1s and ~6 MB. On the benchmark repo,clove newtakes 926 ms, or 61 ms when a spare clone is mounted ahead of time.
Does it work with pnpm, uv, cargo and monorepos?
Yes. clove detects pnpm, bun, yarn, npm, uv, Poetry, cargo and more in each directory, including nested projects with their own lockfile, and warms them in the golden image. Python virtualenvs and cargo's
target/record the absolute path they were built at, so those rebuild in a clone. → Configuration, limits
Does it run on macOS and Linux?
Both. On macOS it uses APFS disk images; on Linux, btrfs in a loop-mounted image file, so the host disk can be any filesystem. The CLI, the terminal UI and the desktop app run on both. Requirements are under Quick start.
How is it different from other worktree tools?
Most copy ignored files one by one or run a setup script per worktree, so the time grows with the repo. clove copies one disk image (macOS) or snapshots one subvolume (Linux), so a clone costs the same whatever the file count. The tools it builds on and sits next to are listed in prior art.
Prior art
clove puts together ideas that already exist, and git and the file system do most of the work. The closest projects:
- Grove: a "golden copy" with warm build state, cloned with
cp -c -R, and an experimental macOS backend on a sparsebundle disk image. Workspaces are full clones, not worktrees; Linux is planned. - rift: workspaces for agents by
clonefile, btrfs snapshots or reflinks (XFS too). Copies your current working state, uncommitted changes included; OpenCode can use it as its worktree backend. - worktrunk: worktrees for parallel agents, with hooks and
copy-ignored, which reflinks ignored files one by one. Works on any file system; time grows with file count.
What clove adds is the combination. The golden image is one disk image (macOS) or subvolume (Linux), so a clone costs the same whatever the file count. Every clone is a regular git worktree with dependencies already installed. The image stays fresh by rerunning only the steps whose inputs changed, and the agent tooling (worktree hooks, session links, clove ps, checkpoints) sits around it.
Everything else nearby
git
git worktree: many checkouts of one repository. Every clone is one.clone --reference/--sharedand sparse checkout save space too, but none of them bring ignored files.
Copy-on-write in the file system
- APFS
clonefile(2)(cp -c) and btrfs snapshots are what clove runs on. - ZFS clones, overlayfs and Docker image layers share a base under a writable layer, the same idea. clove doesn't use them.
Worktree managers that copy or set up
- gwq, wtp, git-worktree-runner: copy or symlink listed files and run setup commands after create. Plain shell and files, nothing to mount.
- git-sprout: a drop-in
git worktree addthat clones unmodified tracked files. No ignored files. - git-twig: also a drop-in
git worktree addthat reflinks tracked files, on APFS, XFS, btrfs and Windows ReFS, and falls back to a plain worktree where it can't. No ignored files. - lane: reflinks ignored files into each worktree one by one, and keeps notes anchored to code that are flagged when it changes.
Copy-on-write workspaces
- cow: one
clonefile(2)of the whole repo,node_modulesincluded. Nothing to keep fresh. - ovnfs: a daemon that serves copy-on-write views of any folder over FUSE, NFS or SMB, without root or a special file system.
node_modulesand build output are read from the original folder, and builds go through the mount.
Parallel coding agents
- Claude Code
--worktreeand the Codex app: a worktree per session,.worktreeincludeto copy ignored files, setup left to you or a script. Claude Code'sWorktreeCreatehook is how clove plugs in. - Conductor, vibe-kanban, Sculptor, claude-squad, uzi, Crystal: worktree per agent, a setup script per workspace in most, and far richer UIs for reviewing and merging agent work than clove has.
- container-use and Codex cloud: a container per agent, which isolates processes and ports too. Codex caches the container after its setup script, a golden image of sorts, in the cloud.
Warm dev environments
- nix-direnv, devenv and mise cache shells and tools per machine; pnpm's store keeps one copy of each package but still writes every
node_modulesfile. - Codespaces prebuilds, prebuilt dev containers and CI caches warm things ahead of time, in the cloud.
Develop
cargo test --workspace # unit tests + an end-to-end run on real disk images (macOS)
CLOVE_E2E=1 cargo test -p clove-cli --test e2e # the CLI end to end, one YAML scenario per test
scripts/smoke.zsh # the CLI through the zsh integration, on a throwaway repo
Rules for changes, for people and coding agents: AGENTS.md. Building each part, tests, code style, and adding a toolchain, agent, app or backend: CONTRIBUTING.md. Benchmarks: docs/benchmarks.md, charted on clove.fast/benchmarks. Releasing: RELEASING.md.
MIT licensed.
Explorer des projets similaires
Chargement…


