| Crates.io | libgodo |
| lib.rs | libgodo |
| version | 0.0.1 |
| created_at | 2025-12-19 04:04:20.272057+00 |
| updated_at | 2025-12-19 04:04:20.272057+00 |
| description | Fast, parallel sandboxes for any Git project |
| homepage | |
| repository | https://github.com/cortesi/godo |
| max_upload_size | |
| id | 1994199 |
| size | 165,298 |
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 godo
Run cargo fmt in an isolated workspace that is cleaned up afterwards:
$ godo run format cargo fmt
~/.godo/<project>/format.cargo fmt runs there, touching only CoW copies.godo/format.--keep to keep it).~/.godo/<project>/<name> (configurable with --dir or GODO_DIR)..git/ – is cloned using copy-on-write where the
filesystem supports it (APFS, Btrfs, ZFS…).--exclude <glob> flags.godo/<name>.--keep or auto-commit with
--commit "msg".godo scriptable.--sh for shell features
like pipes, globs, and redirection.Usage: godo [OPTIONS] <COMMAND>
Commands:
run Run a command in an isolated workspace
diff Diff a sandbox against its base commit
list Show existing sandboxes
remove Delete a named sandbox
clean Clean up a sandbox; removes unmodified worktree and fully merged branch
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
Show tracked and untracked changes in a sandbox compared to its recorded base commit:
godo diff my-sandbox
Override the base commit or pager configuration:
godo diff --base HEAD~1 my-sandbox
godo diff --pager "delta" my-sandbox
godo diff --no-pager my-sandbox
Detect repository
From the current directory (or --repo-dir if specified), walks up until a
.git folder is found to identify the parent Git repository.
Prepare sandbox workspace
Ensures the root godo directory (default ~/.godo, configurable via --dir
or GODO_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> at HEAD without 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" becomes
Command::new("prog").args(["arg1", "a b"]). Pass --sh to 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, allowing
godo to be used in scripts and CI pipelines.
Commit or keep results
Unless --keep is specified, godo prompts to:
git add .) and run git commit --verbose
on branch godo/<name>.Cleanup
After committing (or after the optional shell stage), godo automatically
removes the worktree (git worktree remove) and deletes the sandbox directory.
If the godo/<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:
reflink=1)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.