@pborck/clove 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ clove agents install # teach Claude Code, Codex, OpenCode and Pi to
|
|
|
99
99
|
- ~40s for direnv to evaluate the flake
|
|
100
100
|
- ~30s for `pnpm install --offline`
|
|
101
101
|
- a few GB of new files
|
|
102
|
-
- **Copying the ignored files over doesn't scale with file count.**
|
|
102
|
+
- **Copying the ignored files over doesn't scale with file count.** worktrunk's `copy-ignored` and `cp -c -R` copy-on-write file by file (more in [prior art](#prior-art)). That saves disk, but time grows with the number of files: that repo's ~550k ignored files take minutes, and `clonefile` on the root `node_modules` alone takes ~15s.
|
|
103
103
|
- **clove copies one disk image instead of half a million files**, so the cost doesn't depend on how many files the repo has.
|
|
104
104
|
|
|
105
105
|
## How it works
|
|
@@ -146,23 +146,93 @@ More in [internals](docs/internals.md).
|
|
|
146
146
|
- **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](docs/design/checkpoints.md)
|
|
147
147
|
- **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](docs/commands.md#agent-sessions)
|
|
148
148
|
- **Sees what runs in a clone:** shells, dev servers, editors and agents, with their ports; `clove ps` lists them, and removing a clone stops them first. → [Processes](docs/commands.md#processes-using-a-clone)
|
|
149
|
+
- **Each clone knows who it is:** setup steps, `clove run` and your shell get `CLOVE_CLONE`, `CLOVE_BRANCH`, a `CLOVE_PORT_OFFSET` of its own and a `CLOVE_ID` that survives renames and the trash, so dev servers and `docker compose -p clove-$CLOVE_ID` don't clash; `teardown` commands clean up before a clone is removed. → [Clone identity and teardown](docs/configuration.md#clone-identity-and-teardown)
|
|
149
150
|
- **Renames clones:** `clove rename` moves the folder, the image and the branch when it was named after the clone. → [Renaming a clone](docs/commands.md#renaming-a-clone)
|
|
150
151
|
- **Brings clones up to date:** `clove update` rebases onto the latest base and reruns only the setup steps that changed; conflicts stop cleanly, with `--continue` or `--abort`. → [Updating a clone](docs/commands.md#updating-a-clone)
|
|
151
152
|
- **Works next to plain git worktrees:** lists them, removes them safely, or adopts them as clones. → [Plain git worktrees](docs/commands.md#plain-git-worktrees)
|
|
153
|
+
- **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 prs` lists them with the agent session that owns each clone, and Claude Code and Pi are told on their next prompt or tool call, also about clones their session made, and once when the PR is merged or closed. → [PRs that need attention](docs/commands.md#prs-that-need-attention)
|
|
152
154
|
- **Cleans up after merged PRs,** squash merges included, by hand or automatically, with a history to get any branch back. → [Cleaning up](docs/cleanup.md)
|
|
153
|
-
- **
|
|
155
|
+
- **Removed clones go to a trash:** `clove rm`, prune and auto-prune move a clone aside instead of deleting it, so `clove restore` brings it back with its uncommitted and ignored files and its checkpoints for 7 days (`trash.keep`); the TUI and the app offer Undo. → [The trash](docs/cleanup.md#the-trash)
|
|
156
|
+
- **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_list` and `clove_remove` tools. After a clove upgrade, what it installed is brought up to date on the next run. → [Coding agents](docs/agents.md)
|
|
154
157
|
- **Stays fresh on its own:** incremental refreshes, only when a step's inputs change on the base. → [Staying fresh](docs/freshness.md)
|
|
155
158
|
- **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](docs/configuration.md)
|
|
156
159
|
|
|
157
160
|
Also: [limits](docs/limits.md) and [internals](docs/internals.md) (how clones are stored on macOS and Linux).
|
|
158
161
|
|
|
162
|
+
Every command, flag and setting, generated from the code: [commands reference](docs/reference/commands.md), [configuration reference](docs/reference/configuration.md).
|
|
163
|
+
|
|
164
|
+
## FAQ
|
|
165
|
+
|
|
166
|
+
#### How do I run several Claude Code or Codex agents in parallel on one repo?
|
|
167
|
+
|
|
168
|
+
Give each agent its own clone. `clove new feat/x -x claude` makes one and starts Claude Code in it. After `clove agents install`, `claude --worktree` and 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](docs/agents.md)
|
|
169
|
+
|
|
170
|
+
#### Why not plain `git worktree add`?
|
|
171
|
+
|
|
172
|
+
It checks out the tracked files and nothing else, so every new worktree reinstalls `node_modules`, rebuilds its dev shell and needs its `.env` again. 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](docs/benchmarks.md) repo, `clove new` takes 926 ms, or 61 ms when a spare clone is mounted ahead of time.
|
|
173
|
+
|
|
174
|
+
#### Does it work with pnpm, uv, cargo and monorepos?
|
|
175
|
+
|
|
176
|
+
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](docs/configuration.md), [limits](docs/limits.md)
|
|
177
|
+
|
|
178
|
+
#### Does it run on macOS and Linux?
|
|
179
|
+
|
|
180
|
+
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. See [Requirements](#install).
|
|
181
|
+
|
|
182
|
+
#### How is it different from other worktree tools?
|
|
183
|
+
|
|
184
|
+
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).
|
|
185
|
+
|
|
186
|
+
## Prior art
|
|
187
|
+
|
|
188
|
+
clove puts together ideas that already exist, and git and the file system do most of the work. Projects nearby:
|
|
189
|
+
|
|
190
|
+
**git**
|
|
191
|
+
- [`git worktree`](https://git-scm.com/docs/git-worktree): many checkouts of one repository. Every clone is one. [`clone --reference`/`--shared`](https://git-scm.com/docs/git-clone) and [sparse checkout](https://git-scm.com/docs/git-sparse-checkout) save space too, but none of them bring ignored files.
|
|
192
|
+
|
|
193
|
+
**Copy-on-write in the file system**
|
|
194
|
+
- APFS [`clonefile(2)`](https://keith.github.io/xcode-man-pages/clonefile.2.html) (`cp -c`) and [btrfs snapshots](https://btrfs.readthedocs.io/en/latest/Subvolumes.html) are what clove runs on.
|
|
195
|
+
- [ZFS clones](https://openzfs.github.io/openzfs-docs/man/master/8/zfs-clone.8.html), [overlayfs](https://docs.kernel.org/filesystems/overlayfs.html) and [Docker image layers](https://docs.docker.com/engine/storage/drivers/) share a base under a writable layer, the same idea. clove doesn't use them.
|
|
196
|
+
|
|
197
|
+
**Worktree managers that copy or set up**
|
|
198
|
+
- [worktrunk](https://github.com/max-sixty/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.
|
|
199
|
+
- [gwq](https://github.com/d-kuro/gwq), [wtp](https://github.com/satococoa/wtp), [git-worktree-runner](https://github.com/coderabbitai/git-worktree-runner): copy or symlink listed files and run setup commands after create. Plain shell and files, nothing to mount.
|
|
200
|
+
- [git-sprout](https://github.com/alltuner/git-sprout): a drop-in `git worktree add` that clones unmodified tracked files. No ignored files.
|
|
201
|
+
|
|
202
|
+
**Copy-on-write workspaces**
|
|
203
|
+
- [Grove](https://github.com/chrisbanes/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.
|
|
204
|
+
- [rift](https://github.com/anomalyco/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.
|
|
205
|
+
- [cow](https://github.com/joeinnes/cow): one `clonefile(2)` of the whole repo, `node_modules` included. Nothing to keep fresh.
|
|
206
|
+
|
|
207
|
+
**Parallel coding agents**
|
|
208
|
+
- [Claude Code `--worktree`](https://code.claude.com/docs/en/worktrees) and the [Codex app](https://learn.chatgpt.com/docs/environments/git-worktrees): a worktree per session, `.worktreeinclude` to copy ignored files, setup left to you or a script. Claude Code's `WorktreeCreate` hook is how clove plugs in.
|
|
209
|
+
- [Conductor](https://www.conductor.build/docs/reference/scripts), [vibe-kanban](https://github.com/BloopAI/vibe-kanban), [Sculptor](https://github.com/imbue-ai/sculptor), [claude-squad](https://github.com/smtg-ai/claude-squad), [uzi](https://github.com/devflowinc/uzi), [Crystal](https://github.com/stravu/crystal): worktree per agent, a setup script per workspace in most, and far richer UIs for reviewing and merging agent work than clove has.
|
|
210
|
+
- [container-use](https://github.com/dagger/container-use) and [Codex cloud](https://learn.chatgpt.com/docs/environments/cloud-environment): 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.
|
|
211
|
+
|
|
212
|
+
**Warm dev environments**
|
|
213
|
+
- [nix-direnv](https://github.com/nix-community/nix-direnv), [devenv](https://devenv.sh/) and [mise](https://mise.jdx.dev/) cache shells and tools per machine; [pnpm's store](https://pnpm.io/motivation) keeps one copy of each package but still writes every `node_modules` file.
|
|
214
|
+
- [Codespaces prebuilds](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds), [prebuilt dev containers](https://containers.dev/implementors/reference/) and [CI caches](https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching) warm things ahead of time, in the cloud.
|
|
215
|
+
|
|
216
|
+
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.
|
|
217
|
+
|
|
159
218
|
## Develop
|
|
160
219
|
|
|
161
220
|
```
|
|
162
221
|
cargo test --workspace # unit tests + an end-to-end run on real disk images (macOS)
|
|
163
222
|
scripts/smoke.zsh # the CLI through the zsh integration, on a throwaway repo
|
|
223
|
+
cargo run --release -p clove-core --example bench_new # time clove new + rm, step by step
|
|
224
|
+
CLOVE_E2E=1 cargo test -p clove-cli --test e2e # the CLI end to end, one test per scenario
|
|
164
225
|
```
|
|
165
226
|
|
|
227
|
+
Benchmarks and today's numbers: [docs/benchmarks.md](docs/benchmarks.md).
|
|
228
|
+
|
|
229
|
+
The CLI scenarios are YAML files in `crates/clove-cli/tests/e2e`. Each runs
|
|
230
|
+
the real binary in its own temp HOME and unmounts what it made. CI runs them
|
|
231
|
+
on macOS and on Linux with btrfs. The format is in
|
|
232
|
+
[their README](crates/clove-cli/tests/e2e/README.md).
|
|
233
|
+
|
|
234
|
+
Rules for changes, for people and coding agents: [AGENTS.md](AGENTS.md). Building each part, code style, and adding a toolchain, agent, app or backend: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
235
|
+
|
|
166
236
|
Releasing and signing: [RELEASING.md](RELEASING.md).
|
|
167
237
|
|
|
168
238
|
MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pborck/clove",
|
|
3
3
|
"description": "Copy-on-write git worktrees with dependencies already installed",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.34",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/pierre-borckmans/clove",
|
|
7
7
|
"repository": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"node": ">=18"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@pborck/clove-darwin-arm64": "0.1.
|
|
22
|
-
"@pborck/clove-darwin-x64": "0.1.
|
|
23
|
-
"@pborck/clove-linux-arm64": "0.1.
|
|
24
|
-
"@pborck/clove-linux-x64": "0.1.
|
|
21
|
+
"@pborck/clove-darwin-arm64": "0.1.34",
|
|
22
|
+
"@pborck/clove-darwin-x64": "0.1.34",
|
|
23
|
+
"@pborck/clove-linux-arm64": "0.1.34",
|
|
24
|
+
"@pborck/clove-linux-x64": "0.1.34"
|
|
25
25
|
}
|
|
26
26
|
}
|