Fast, parallel sandboxes for any Git project.
godo creates copy-on-write worktrees so you can run tests, generators or
one-off tools in isolation. Each sandbox is disposable, disk-cheap and mapped
to its own branch, letting you merge the results whenever you are ready.
Want to contribute? Have ideas or feature requests? Come tell us about it on Discord.
cargo install godoRun cargo fmt in an isolated workspace that is cleaned up afterwards:
$ godo run format cargo fmt- A worktree appears in
~/.godo/<project>/format. cargo fmtruns there, touching only CoW copies.- The tool prompts you for a commit message and commits the result to branch
godo/format. - The sandbox is deleted (pass
--keepto keep it).
- Works from any Git repository.
- Sandboxes live under
~/.godo/<project>/<name>(configurable with--dirorGODO_DIR). - The full file tree – except
.git/– is cloned using copy-on-write where the filesystem supports it (APFS, Btrfs, ZFS…). - Exclude paths with repeated
--exclude <glob>flags. - Each sandbox is backed by branch
godo/<name>. - Automatic cleanup; keep a sandbox with
--keepor auto-commit with--commit "msg". - Exit codes from commands are preserved, making
godoscriptable. - Direct exec preserves quoting and args; use
--shfor shell features like pipes, globs, and redirection.
Usage: godo [OPTIONS] <COMMAND>
Commands:
run Run a command in an isolated workspace
list Show existing sandboxes
remove Delete a named sandbox
help Print this message or the help of the given subcommand(s)
Options:
--dir <DIR> Override the godo directory location
--repo-dir <DIR> Override the repository directory (defaults to current git project)
--color Enable colored output
--no-color Disable colored output
--quiet Suppress all output
--no-prompt Skip confirmation prompts
-h, --help Print help
-V, --version Print version-
Detect repository
From the current directory (or--repo-dirif specified), walks up until a.gitfolder is found to identify the parent Git repository. -
Prepare sandbox workspace
Ensures the root godo directory (default~/.godo, configurable via--dirorGODO_DIR) and per-project subdirectory exist, then runs:git worktree add --quiet -b godo/<name> ~/.godo/<project>/<name>
to create a new worktree on branch
godo/<name>atHEADwithout duplicating objects. -
Clone the file tree
Uses clonetree to copy the working tree, skipping.git/and honouring--exclude <glob>rules. On copy-on-write filesystems this is instantaneous and consumes no additional space. -
Run the command or shell
By default, execs the program directly with its arguments (no extra shell), preserving argument boundaries and quoting:prog arg1 "a b"becomesCommand::new("prog").args(["arg1", "a b"]). Pass--shto force shell evaluation via$SHELL -c "<COMMAND>"(useful for pipes, globs, etc.). If no command is provided, an interactive shell is opened in the sandbox. The exit code from the command is preserved and passed back to the caller, allowinggodoto be used in scripts and CI pipelines. -
Commit or keep results
Unless--keepis specified, godo prompts to:- commit: stage all changes (
git add .) and rungit commit --verboseon branchgodo/<name>. - shell: open an interactive shell in the sandbox (then clean up on exit).
- keep: leave the sandbox intact for manual inspection or re-runs.
- commit: stage all changes (
-
Cleanup
After committing (or after the optional shell stage), godo automatically removes the worktree (git worktree remove) and deletes the sandbox directory. If thegodo/<name>branch has no unmerged commits, the branch is also deleted. -
You can now merge the changes from
godo/<name>into your main branch whenever you like.
godo uses clonetree for efficient
file cloning. Performance depends on your filesystem's copy-on-write (CoW)
capabilities:
- macOS 10.13+ / APFS
- iOS / APFS
- Linux 6.7+ / Btrfs
- Linux 5.4+ / XFS (with
reflink=1) - Linux 6.1+ / bcachefs
- Linux 5.13+ / overlayfs
- Windows Server 2016+ / ReFS
- ext4 (Ubuntu/Fedora default) - Falls back to byte-for-byte copy
On CoW-enabled filesystems, cloning is near-instantaneous and uses no additional disk space until files are modified. On other filesystems, a full copy is made, which may take longer for large repositories.