Snapshot once. Branch in seconds. Run tests and coding agents against isolated PostgreSQL, MySQL or MongoDB databases.
Free, no sign-up required.
brancher help agentUse Cases
Cache the state you want to reuse. Clone the state you want to throw away.
01 · CI
Snapshot your database once, after migrations and seed data. Every later CI job clones that prepared state in seconds instead of rebuilding it.
02 · Tests
Clone the same snapshot once per worker. Run tests in parallel against isolated databases without rebuilding or copying the full database.
03 · Agents
Each worktree or coding agent branches from the same snapshot. Commit to move main, rebase to catch up, or throw it away.
Built for disposable environments
Reset instantly
Start a fresh clone from the same snapshot after every run.
Share snapshots
Snapshots are files. Hand the exact state to another job, machine or agent.
Throw it away
Clones are disposable. Create one for a job, stop it when the job is done.
Root defaults to .brancher in the current directory.
Using Django? There's a shorter setup. Install the package, create the clones with one command, then run your tests as usual.
Supported on Debian Linux and macOS. Use curl on Debian, or curl or Homebrew on macOS. Other Linux distributions and Windows are on the roadmap.
Recorded once under ~/.config/brancher/eula. Later commands don't prompt.
Defaults: engine postgres, compression zstd, encryption on. The snap key is written to ~/.config/brancher/keys/<root-id>. base and main point at the empty database.
branch runs the command against a fork of the ref. A clean exit publishes the snapshot and moves the ref. psql picks up PGHOST, PGPORT etc. from the environment brancher sets; no password.
main still has only the seed row. feature has both.
Each line is session id, port and URL. A main clone returns the seed row; a feature clone returns both. Writes in a clone stay in that clone.
Stops the running clones. brancher ls still lists main and feature.
Framework integrations
On a large Django project, a lot of test time goes to creating the test database and replaying every migration. The django-baseshift-brancher package skips both. Each test worker gets its own Postgres clone, already migrated to the schema of your current git checkout.
Works with pytest-django (-n N) and manage.py test (--parallel N)
No changes to settings.py
Migrated snapshots are cached per migration commit and shared across branches
add migrationsBuilds on the previous snapshot. Branches that split off the same migration commit share it.
edit or delete migrationsStarts over from an empty snapshot, because the new schema can't be built on top of the old one.
rebaseGets a new snapshot on top of its new parent. Branches from before the rebase keep their own chain.
Using an agent? The README has the exact command sequence and rules for agents.
Full README →brancher uses Baseshift's libc interposition library for block-level copy-on-write. Data is stored in chunks, and metadata describing the state of the file system is stored in .snap files saved when the database shuts down.
Debian Linux and macOS. Other Linux distributions and Windows are on the roadmap.
Postgres, MySQL, MongoDB. More to come.
zstd compression and encryption on by default. Keys in ~/.config/brancher/keys.
Snapshots are just files. Move them anywhere files go.
brancher is built on Baseshift core.