Scott Watermasysk presents

Stooges

Git Workspaces, the Smart Way

Multiple independent copies of your repository—with near-zero disk overhead. No stashing. No conflicts. No nonsense.

✽ ✽ ✽

Starring

Larry

Larry

Workspace One

Curly

Curly

Workspace Two

Moe

Moe

Workspace Three

The Picture

You run an AI coding agent in one workspace. A long test suite in another. A hotfix in a third. Each one a fully independent clone of your repository—its own .git, its own index, its own branch.

And thanks to copy-on-write magic, they share disk blocks with the original. Extra space? Only as files diverge. It's practically free.

Method Disk Cost Independent? Tooling
Plain Copies Full duplicate Yes None
Git Worktrees Shared .git No — shared index & locks Built-in
Stooges Copy-on-write Yes Full CLI

Feature Presentation

Copy-on-Write

Workspaces share disk blocks with the original. Extra space used only as files diverge. Near-zero overhead.

Fully Independent

Each workspace has its own .git directory. No shared lock files. No index conflicts. True isolation.

Sync & Rebase

Keep all workspaces current with one command. Automatic conflict-free rebasing across every branch.

Built for Agents

Run multiple AI coding agents in parallel, each in its own isolated workspace. No stepping on toes.

A Typical Scene

Initialize Once

$ stooges init

Sets up the base repo & creates Larry, Curly, and Moe.

Add a Workspace

$ stooges add auto-cd -b

Creates a new workspace with its own branch. Base-derived add (except --track) and branch runs sync first by default. Or use stooges branch scott/auto-cd, stooges fork scott/auto-cd, stooges track feature/shell-init, or stooges pr 37 to derive the workspace name automatically.

Work Independently

$ cd auto-cd && git commit -am "add shell wrapper"

Or enable the optional shell wrapper and stooges add, stooges branch, stooges fork, stooges track, or stooges pr can drop you in automatically.

Keep Everything Current

$ stooges rebase

Syncs base, rebases all workspace branches. Done.

The Full Repertoire

Command names accept unique unambiguous prefixes too, so stooges br scott/auto-cd works the same as stooges branch scott/auto-cd. Ambiguous prefixes still fail.

Branch Example

$ stooges branch scott/auto-cd

Derives workspace auto-cd and creates or switches local branch scott/auto-cd.

Fork Example

$ cd larry && stooges fork scott/auto-cd

Copies the current managed workspace state into auto-cd and creates local branch scott/auto-cd; errors if that branch already exists in the copied workspace.

Track Example

$ stooges track feature/shell-init

Derives workspace shell-init and checks out a local branch tracking origin/feature/shell-init; errors if the remote branch is missing or the destination local branch already exists.

PR Example

$ stooges pr 37

Looks up PR #37 with the GitHub CLI, checks gh auth status first, derives a workspace name from the PR head branch, and checks out that PR in the new workspace. Cross-repo setup runs only after checkout succeeds. Run stooges pr with no number to choose from open PRs interactively.

Hooks & Cleanup

$ stooges trash auto-cd --force

Add setupScript and teardownScript to the existing .stooges-metadata.json to automate per-workspace setup and cleanup. Setup runs after checkout; pass --no-setup or --rollback-on-setup-failure on add/branch/fork/track/pr when needed. Trash preflights removal, runs teardown, then uses Trash or forced deletion.

stooges init Set up base repo & default workspaces
stooges add Create workspaces with optional branches and setup controls; base-derived syncs first except --track
stooges branch Create a workspace from a branch name; syncs base first and supports setup controls
stooges fork Copy the current workspace into a new branched workspace; supports setup controls
stooges track Create a tracked workspace from a remote branch name; supports setup controls
stooges pr Create a workspace from a GitHub pull request via gh; setup runs after checkout
stooges sync Fetch & fast-forward the base repo
stooges rebase Sync base, then rebase all workspace branches
stooges clean Sync & prune stale remote-tracking refs
stooges list Show all workspaces with branch & status
stooges trash Preflight removal, run teardown, then move to Trash or force-delete
stooges doctor Check platform support & workspace health
stooges shell-init Optional shell wrapper for auto-cd after add/branch/fork/track/pr
stooges upgrade Install the latest GitHub release over this binary
stooges lock/unlock Toggle read-only protection on base repo
✽ ✽ ✽

Now Showing

Get the Picture

$ curl -sSL https://raw.githubusercontent.com/scottwater/stooges/main/install.sh | bash

or, with Go—

$ go install github.com/scottwater/stooges/cmd/stooges@latest

Already installed? Run stooges upgrade to grab the latest release.

Optional: enable auto-cd after stooges add, stooges branch, stooges fork, stooges track, or stooges pr by adding this to your shell profile:

$ eval "$(stooges shell-init zsh)"

Use bash instead of zsh if needed. This setup is optional; without it, Stooges works normally and you can just cd into the workspace yourself.


View on GitHub
Copied to clipboard