clove
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 37 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Copy-on-write git worktrees with dependencies already installed
clove
A ready git worktree in ~1s, with node_modules, the dev shell and every other ignored file already there.
$ 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 |
Install
The CLI and terminal UI, on macOS and Linux:
brew install pierre-borckmans/tap/clove
clove shell-init --install # cd into new clones, completions (zsh, bash, fish)
The desktop app, on macOS, with a menu-bar popover:
brew install --cask pierre-borckmans/tap/clove-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
Then, 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)
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) 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
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.
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
- Any branch or PR, ready in ~1s.
clove new feat/x,clove new pr:123, or-x claudeto start an agent in it. → Commands - CLI, terminal UI and desktop app (macOS and Linux), with the same features everywhere; every command takes
--json. → Interfaces - Shell integration:
cdinto new clones, completions, and each clone's environment loaded while you're in it. → Shell integration - Checkpoints, rewind and fork: freeze a clone mid-work in ~0.05s, put it back in ~1.5s, or fork it into new clones with its uncommitted state. → Checkpoints
- Agent sessions, linked to their clone: clove reads Claude Code, Codex, pi and Antigravity logs on your machine to show which sessions made or worked in each clone. Read one as a conversation, follow a live one, or resume it in a terminal. → Agent sessions
- Sees what runs in a clone: shells, dev servers, editors and agents, with their ports;
clove pslists them, and removing a clone stops them first. → Processes - Renames clones:
clove renamemoves the folder, the image and the branch when it was named after the clone. → Renaming a clone - Brings clones up to date:
clove updaterebases onto the latest base and reruns only the setup steps that changed; conflicts stop cleanly, with--continueor--abort. → Updating a clone - Works next to plain git worktrees: lists them, removes them safely, or adopts them as clones. → Plain git worktrees
- Flags PRs that need attention: failing checks, requested changes, open review threads and conflicts show on the clone in the TUI and the app,
clove prslists them with the agent session that owns each clone, and Claude Code and Pi are told on their next prompt or tool call. → PRs that need attention - Cleans up after merged PRs, squash merges included, by hand or automatically, with a history to get any branch back. → Cleaning up
- Built for coding agents: one command teaches Claude Code, Codex, OpenCode and Pi to use clones. Claude Code and OpenCode use clones for native worktrees in repos clove manages. OpenCode and Pi also get
clove_new,clove_listandclove_removetools. → Coding agents - Stays fresh on its own: incremental refreshes, only when a step's inputs change on the base. → Staying fresh
- 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, plus your own steps and local files like
.env. → Configuration
Also: limits and internals (how clones are stored on macOS and Linux).
Every command, flag and setting, generated from the code: commands reference, configuration reference.
Prior art
clove puts together ideas that already exist, and git and the file system do most of the work. Projects 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
- 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. - 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.
Copy-on-write workspaces
- Grove is the closest: 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. - cow: one
clonefile(2)of the whole repo,node_modulesincluded. Nothing to keep fresh.
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.
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.
Develop
cargo test --workspace # unit tests + an end-to-end run on real disk images (macOS)
scripts/smoke.zsh # the CLI through the zsh integration, on a throwaway repo
cargo run --release -p clove-core --example bench_new # time clove new + rm, step by step
CLOVE_E2E=1 cargo test -p clove-cli --test e2e # the CLI end to end, one test per scenario
Benchmarks and today's numbers: docs/benchmarks.md.
The CLI scenarios are YAML files in crates/clove-cli/tests/e2e. Each runs
the real binary in its own temp HOME and unmounts what it made. CI runs them
on macOS and on Linux with btrfs. The format is in
their README.
Rules for changes, for people and coding agents: AGENTS.md. Building each part, code style, and adding a toolchain, agent, app or backend: CONTRIBUTING.md.
Releasing and signing: RELEASING.md.
MIT licensed.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found