Built for the AI coding-agent era
Isolated git worktrees,
one command away
Give every branch — and every AI coding agent — its own directory
and its own shell. No daemon, no state, just git.
Why cuttings?
When you’re working with AI coding assistants — or simply juggling multiple features — you often need several completely isolated copies of a repository, each on a different branch, each with its own terminal session. Switching branches in a single directory disrupts uncommitted work and forces every tool, human or AI, to reload context.
In horticulture, a cutting is a piece taken from a plant that roots in its
own soil and grows into a fully independent plant — while still sharing the
same genetic material as the parent. cuttings is a git worktree manager
built on exactly that idea: a single command takes a cutting from your main
checkout — a real git worktree of
its own — and grows it into an isolated directory with its own shell, sharing
the same underlying git history and objects the whole time.
Instant isolation
One command takes a cutting and opens a shell inside it — no manual git worktree juggling.
Zero state
All state lives in git itself (git worktree list). No daemon, no config database, nothing to get out of sync.
One-off commands
cuttings run -- <cmd> takes a temporary cutting, runs your command inside it, and clears it away automatically — exit code and all. No shell, no manual cleanup.
Run AI coding agents in parallel
Tools like AI coding agents work best with a
directory of their own. Open one cuttings session per feature and every
agent gets a clean, conflict-free copy of the repo — no branch switching, no
file locks, no lost context. Interactive, agent-driven, or one-off — every
session gets its own isolated worktree:
cuttings new feature/auth-refactor
# Your coding agent works here, on its own branch,
# in its own directory, with its own shell.cuttings run -b feature/dashboard -- claude
# spins up (or reuses) the worktree, then
# launches your coding agent straight into it.cuttings run -- go test ./...
# a disposable worktree for one command —
# runs, exits, and cleans itself up.Install
Download the latest release for your platform from
GitHub Releases,
then extract it and put the binary on your PATH. The steps differ slightly
by OS since releases ship as .tar.gz for macOS/Linux and .zip for Windows:
# Example for Linux amd64 — swap in your platform's archive name
tar -xzf cuttings_linux_amd64.tar.gz
mv cuttings /usr/local/bin/Available platforms: linux_amd64, linux_arm64, darwin_amd64,
darwin_arm64, windows_amd64.
Quickstart
Most of the time you don’t need an interactive shell at all — you just want a command to run against a clean copy of the repo:
cuttings run -- go test ./...This creates a temporary worktree at the current branch’s HEAD, runs the command inside it, and removes the worktree when the command finishes — whether it succeeds or fails. The command’s exit code is propagated back to your shell, so it’s a drop-in wrapper for CI steps or agent scripts. Nothing to clean up afterward.
Need the worktree to stick around on a named branch instead of a throwaway detached HEAD?
cuttings run --branch feature/my-feature -- go test ./...--branch creates the branch (and its worktree) if it doesn’t exist yet, or
reuses it if it does. Since a reused cutting isn’t temporary, you’ll be
asked whether to remove it once the command finishes — add --remove-after
to skip the prompt and always remove it, e.g. from a script or CI.
Core commands
Five commands cover the whole workflow, from spinning up an isolated worktree to cleaning it back up again:
Takes a cutting for the branch — making the branch too, if it doesn’t exist yet — and drops you straight into an interactive shell inside it. A real, isolated directory, ready to work in.
cuttings new feature/auth
# new worktree + branch, ready with a shellShows everything you’ve got growing at a glance: every cutting’s branch name and worktree path, plus whether it’s the main checkout. No need to remember what you’ve got open.
cuttings list
# every active cutting, branch and typeReopens a shell inside any existing cutting, so you can jump back into work in progress anytime. Nothing is recreated — it’s the same directory, exactly as you left it.
cuttings shell feature/auth
# back into that cutting, anytimeUproots the cutting once you’re done with it. The git branch itself is preserved, so you can take the same cutting again later if you need to.
cuttings remove feature/auth
# worktree gone, branch preservedTakes a quick, temporary cutting, runs a single command inside it, and
clears it away automatically — exit code and all. Add --branch to keep
it around and let it take root, instead of a throwaway.
cuttings run -- go test ./...
# temporary worktree, runs it, cleans itself upContribute
cuttings is MIT-licensed and built in the open. Found a bug, have an idea, or want to fix something yourself? Issues and pull requests are welcome.