@pborck/clove 0.1.33 → 0.1.35
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 +109 -51
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
A ready git worktree in ~1s, with `node_modules`, the dev shell and every other ignored file already there.
|
|
13
13
|
|
|
14
|
+
[clove.fast](https://clove.fast), with a video and the [docs](https://clove.fast/docs/).
|
|
15
|
+
|
|
14
16
|
```
|
|
15
17
|
$ clove new feat/login
|
|
16
18
|
+ feat/login
|
|
@@ -30,22 +32,52 @@ $ clove new feat/login
|
|
|
30
32
|
| Time to a usable checkout | ~70s | ~1s |
|
|
31
33
|
| New disk per worktree | a few GB | ~6 MB |
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
~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](docs/benchmarks.md) repo.
|
|
36
|
+
|
|
37
|
+
<a href="https://clove.fast"><img src="https://clove.fast/shots/app-repo.png" alt="The clove desktop app: a repo's golden image with its warm steps, and its clones with branch, changes, PR state and size" width="100%"></a>
|
|
38
|
+
|
|
39
|
+
<a href="https://clove.fast"><img src="https://clove.fast/shots/tui-main.png" alt="The clove terminal UI: repos, clones with branch, changes and size, and the selected clone's details and timings" width="100%"></a>
|
|
40
|
+
|
|
41
|
+
The desktop app and the terminal UI show the same things, and the CLI does it all too.
|
|
42
|
+
|
|
43
|
+
<a href="https://clove.fast/#surfaces"><img src="https://clove.fast/casts/new.gif" alt="clove new feat/login in a terminal: the clone is ready in 18 ms, then npm test passes in it" width="100%"></a>
|
|
44
|
+
|
|
45
|
+
<sub>Recorded on Linux (btrfs) with a small demo repo. On macOS, a cold clone of a big monorepo takes about a second.</sub>
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary>More recordings: checkpoint and rewind, the trash, ls and ps</summary>
|
|
49
|
+
|
|
50
|
+
<img src="https://clove.fast/casts/checkpoint.gif" alt="clove checkpoint, then rm -rf src in the clone, then clove rewind brings src back" width="100%">
|
|
51
|
+
|
|
52
|
+
<img src="https://clove.fast/casts/trash.gif" alt="clove rm moves a clone to the trash, clove trash lists it, clove restore brings it back" width="100%">
|
|
53
|
+
|
|
54
|
+
<img src="https://clove.fast/casts/ls.gif" alt="clove ls lists clones with branch, changes and size; clove ps shows the dev server running in one" width="100%">
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
</details>
|
|
57
|
+
|
|
58
|
+
## Install
|
|
36
59
|
|
|
37
60
|
```
|
|
38
|
-
brew install pierre-borckmans/tap/clove
|
|
39
|
-
|
|
61
|
+
brew install pierre-borckmans/tap/clove # CLI and terminal UI, macOS and Linux
|
|
62
|
+
brew install --cask pierre-borckmans/tap/clove-app # desktop app with a menu-bar popover, macOS
|
|
63
|
+
clove shell-init --install # cd into new clones, completions (zsh, bash, fish)
|
|
40
64
|
```
|
|
41
65
|
|
|
42
|
-
|
|
66
|
+
## Quick start
|
|
67
|
+
|
|
68
|
+
In a repository:
|
|
43
69
|
|
|
44
70
|
```
|
|
45
|
-
|
|
71
|
+
clove init # shows what it will set up, then builds the golden image (once)
|
|
72
|
+
clove new feat/login # a ready worktree on that branch
|
|
73
|
+
clove service install # remount clones at login, keep golden images fresh
|
|
74
|
+
clove agents install # teach Claude Code, Codex, OpenCode and Pi to use clove (optional)
|
|
46
75
|
```
|
|
47
76
|
|
|
48
|
-
|
|
77
|
+
<details>
|
|
78
|
+
<summary><strong>Other ways to install</strong></summary>
|
|
79
|
+
|
|
80
|
+
The desktop app on Linux (x86_64 and arm64): a `.deb` and an AppImage are on the [releases page](https://github.com/pierre-borckmans/clove/releases). It runs the CLI for the background service, so install that too.
|
|
49
81
|
|
|
50
82
|
```
|
|
51
83
|
sudo apt install ./clove-app-v<version>-x86_64.deb # Debian, Ubuntu
|
|
@@ -58,14 +90,7 @@ Without Homebrew:
|
|
|
58
90
|
- **Prebuilt binaries** for macOS and Linux are on the [releases page](https://github.com/pierre-borckmans/clove/releases). The macOS ones are signed and notarized.
|
|
59
91
|
- **From source:** `cargo install --git https://github.com/pierre-borckmans/clove clove-cli`
|
|
60
92
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
clove init # shows what it will set up, then builds the golden image (once)
|
|
65
|
-
clove new feat/login # a ready worktree on that branch
|
|
66
|
-
clove service install # remount clones at login, keep golden images fresh
|
|
67
|
-
clove agents install # teach Claude Code, Codex, OpenCode and Pi to use clove (optional)
|
|
68
|
-
```
|
|
93
|
+
</details>
|
|
69
94
|
|
|
70
95
|
<details>
|
|
71
96
|
<summary><strong>Requirements</strong></summary>
|
|
@@ -78,7 +103,7 @@ clove agents install # teach Claude Code, Codex, OpenCode and Pi to
|
|
|
78
103
|
|
|
79
104
|
#### Linux
|
|
80
105
|
|
|
81
|
-
- `btrfs-progs` (`sudo apt install btrfs-progs`) and loop devices. The host disk can be any filesystem.
|
|
106
|
+
- `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.
|
|
82
107
|
- Kernel 6.7+ gives exact clone sizes (simple quotas). Older kernels use full qgroups, or report no sizes.
|
|
83
108
|
- `clove init` offers to add one line to `/etc/fstab`, with sudo, once per repo:
|
|
84
109
|
|
|
@@ -140,26 +165,69 @@ More in [internals](docs/internals.md).
|
|
|
140
165
|
|
|
141
166
|
## Features
|
|
142
167
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
- **
|
|
146
|
-
- **Checkpoints, rewind and fork:** freeze a clone
|
|
147
|
-
- **
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
- **
|
|
154
|
-
- **
|
|
155
|
-
- **
|
|
156
|
-
- **
|
|
157
|
-
|
|
158
|
-
|
|
168
|
+
#### Clones
|
|
169
|
+
|
|
170
|
+
- **Any branch or PR, ready in ~1s:** `clove new feat/x`, `clove new pr:123`, or `-x claude` to start an agent in it. → [Commands](docs/commands.md)
|
|
171
|
+
- **Checkpoints, rewind and fork:** freeze a clone in ~0.05s, put it back in ~1.5s, or fork it with its uncommitted state. → [Checkpoints](docs/design/checkpoints.md)
|
|
172
|
+
- **Each clone knows who it is:** `CLOVE_ID`, `CLOVE_BRANCH` and a `CLOVE_PORT_OFFSET` of its own keep dev servers and `docker compose` projects apart; `teardown` cleans up on removal. → [Clone identity](docs/configuration.md#clone-identity-and-teardown)
|
|
173
|
+
- **Updates and renames:** `clove update` rebases and reruns only the changed steps; `clove rename` moves folder, image and branch. → [Updating](docs/commands.md#updating-a-clone), [renaming](docs/commands.md#renaming-a-clone)
|
|
174
|
+
- **Next to plain git worktrees:** lists them, removes them safely, or adopts them as clones. → [Plain git worktrees](docs/commands.md#plain-git-worktrees)
|
|
175
|
+
|
|
176
|
+
#### Coding agents
|
|
177
|
+
|
|
178
|
+
- **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](docs/agents.md)
|
|
179
|
+
- **Agent sessions linked to their clone:** read one as a conversation, follow a live one, or resume it. → [Agent sessions](docs/commands.md#agent-sessions)
|
|
180
|
+
- **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](docs/commands.md#prs-that-need-attention)
|
|
181
|
+
- **Sees what runs in a clone:** shells, dev servers, editors and agents, with their ports; removing a clone stops them first. → [Processes](docs/commands.md#processes-using-a-clone)
|
|
182
|
+
|
|
183
|
+
#### Cleanup
|
|
184
|
+
|
|
185
|
+
- **Cleans up after merged PRs,** squash merges included, by hand or on its own, with a history to get any branch back. → [Cleaning up](docs/cleanup.md)
|
|
186
|
+
- **Removed clones go to a trash** for 7 days; `clove restore` brings one back with its uncommitted files and checkpoints. → [The trash](docs/cleanup.md#the-trash)
|
|
187
|
+
|
|
188
|
+
#### Setup
|
|
189
|
+
|
|
190
|
+
- **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 files like `.env`. → [Configuration](docs/configuration.md)
|
|
191
|
+
- **Stays fresh on its own:** refreshes only when a step's inputs change on the base. → [Staying fresh](docs/freshness.md)
|
|
192
|
+
- **CLI, terminal UI and desktop app** with the same features, `--json` on every command, and a shell integration that loads each clone's environment. → [Interfaces](docs/commands.md#interfaces), [shell integration](docs/commands.md#shell-integration)
|
|
193
|
+
- **Repos in your order:** drag them in the app's sidebar, press `(` `)` in the terminal UI, or run `clove repos move web 1`. All three list them the same way. → [Interfaces](docs/commands.md#interfaces)
|
|
194
|
+
|
|
195
|
+
Also: [limits](docs/limits.md), [internals](docs/internals.md), and every command, flag and setting generated from the code: [commands reference](docs/reference/commands.md), [configuration reference](docs/reference/configuration.md).
|
|
196
|
+
|
|
197
|
+
## FAQ
|
|
198
|
+
|
|
199
|
+
#### How do I run several Claude Code or Codex agents in parallel on one repo?
|
|
200
|
+
|
|
201
|
+
> 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)
|
|
202
|
+
|
|
203
|
+
#### Why not plain `git worktree add`?
|
|
204
|
+
|
|
205
|
+
> 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.
|
|
206
|
+
|
|
207
|
+
#### Does it work with pnpm, uv, cargo and monorepos?
|
|
208
|
+
|
|
209
|
+
> 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)
|
|
210
|
+
|
|
211
|
+
#### Does it run on macOS and Linux?
|
|
212
|
+
|
|
213
|
+
> 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](#quick-start).
|
|
214
|
+
|
|
215
|
+
#### How is it different from other worktree tools?
|
|
216
|
+
|
|
217
|
+
> 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).
|
|
159
218
|
|
|
160
219
|
## Prior art
|
|
161
220
|
|
|
162
|
-
clove puts together ideas that already exist, and git and the file system do most of the work.
|
|
221
|
+
clove puts together ideas that already exist, and git and the file system do most of the work. The closest projects:
|
|
222
|
+
|
|
223
|
+
- [Grove](https://github.com/chrisbanes/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.
|
|
224
|
+
- [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.
|
|
225
|
+
- [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.
|
|
226
|
+
|
|
227
|
+
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.
|
|
228
|
+
|
|
229
|
+
<details>
|
|
230
|
+
<summary><strong>Everything else nearby</strong></summary>
|
|
163
231
|
|
|
164
232
|
**git**
|
|
165
233
|
- [`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.
|
|
@@ -169,14 +237,14 @@ clove puts together ideas that already exist, and git and the file system do mos
|
|
|
169
237
|
- [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.
|
|
170
238
|
|
|
171
239
|
**Worktree managers that copy or set up**
|
|
172
|
-
- [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.
|
|
173
240
|
- [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.
|
|
174
241
|
- [git-sprout](https://github.com/alltuner/git-sprout): a drop-in `git worktree add` that clones unmodified tracked files. No ignored files.
|
|
242
|
+
- [git-twig](https://github.com/leostera/git-twig): also a drop-in `git worktree add` that reflinks tracked files, on APFS, XFS, btrfs and Windows ReFS, and falls back to a plain worktree where it can't. No ignored files.
|
|
243
|
+
- [lane](https://github.com/lukeed/lane): reflinks ignored files into each worktree one by one, and keeps notes anchored to code that are flagged when it changes.
|
|
175
244
|
|
|
176
245
|
**Copy-on-write workspaces**
|
|
177
|
-
- [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.
|
|
178
|
-
- [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.
|
|
179
246
|
- [cow](https://github.com/joeinnes/cow): one `clonefile(2)` of the whole repo, `node_modules` included. Nothing to keep fresh.
|
|
247
|
+
- [ovnfs](https://github.com/stencil-hq/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_modules` and build output are read from the original folder, and builds go through the mount.
|
|
180
248
|
|
|
181
249
|
**Parallel coding agents**
|
|
182
250
|
- [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.
|
|
@@ -187,26 +255,16 @@ clove puts together ideas that already exist, and git and the file system do mos
|
|
|
187
255
|
- [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.
|
|
188
256
|
- [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.
|
|
189
257
|
|
|
190
|
-
|
|
258
|
+
</details>
|
|
191
259
|
|
|
192
260
|
## Develop
|
|
193
261
|
|
|
194
262
|
```
|
|
195
|
-
cargo test --workspace
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
CLOVE_E2E=1 cargo test -p clove-cli --test e2e # the CLI end to end, one test per scenario
|
|
263
|
+
cargo test --workspace # unit tests + an end-to-end run on real disk images (macOS)
|
|
264
|
+
CLOVE_E2E=1 cargo test -p clove-cli --test e2e # the CLI end to end, one YAML scenario per test
|
|
265
|
+
scripts/smoke.zsh # the CLI through the zsh integration, on a throwaway repo
|
|
199
266
|
```
|
|
200
267
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
The CLI scenarios are YAML files in `crates/clove-cli/tests/e2e`. Each runs
|
|
204
|
-
the real binary in its own temp HOME and unmounts what it made. CI runs them
|
|
205
|
-
on macOS and on Linux with btrfs. The format is in
|
|
206
|
-
[their README](crates/clove-cli/tests/e2e/README.md).
|
|
207
|
-
|
|
208
|
-
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).
|
|
209
|
-
|
|
210
|
-
Releasing and signing: [RELEASING.md](RELEASING.md).
|
|
268
|
+
Rules for changes, for people and coding agents: [AGENTS.md](AGENTS.md). Building each part, tests, code style, and adding a toolchain, agent, app or backend: [CONTRIBUTING.md](CONTRIBUTING.md). Benchmarks: [docs/benchmarks.md](docs/benchmarks.md). Releasing: [RELEASING.md](RELEASING.md).
|
|
211
269
|
|
|
212
270
|
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.35",
|
|
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.35",
|
|
22
|
+
"@pborck/clove-darwin-x64": "0.1.35",
|
|
23
|
+
"@pborck/clove-linux-arm64": "0.1.35",
|
|
24
|
+
"@pborck/clove-linux-x64": "0.1.35"
|
|
25
25
|
}
|
|
26
26
|
}
|