Work across branches
Put a feature in its own universe, override one repository's branch, add a repository, and remove a universe when you are done.
Work on two branches at once
# name the universe after the branch it checks out $ multiversectl new fix/login --note "PR 412 review" $ multiversectl up fix/login $ multiversectl urls fix/login http://api-fix-login.10-0-0-5.traefik.me # or number it, and override one repository's branch $ multiversectl new 2 --branch feat/invoicing --branch web=main
A named universe is checked out on its own name; a numbered one takes its branch from spec.branch, u{{universe}} by default. --branch is repeatable: a bare name is every repository, repo=branch overrides one. Every command accepts the name as typed, the directory it lives in, or the slug in its hostnames. Each universe has its own checkouts, containers and database.
Add a repository to a workspace
# multiverse.yaml spec: repos: - name: worker url: git@github.com:acme/worker.git
That is the whole change: a repository no apps entry names gets an app of its own name, its compose files are found by convention, every service they define is started and the addresses come from their labels. Add an apps entry only to change one of those, or to split the repository into several apps.
# clone the new repo (already-cloned ones are skipped) $ multiversectl bootstrap ./multiverse.yaml --root ~/acme # add its worktree to an existing universe; existing checkouts are kept $ multiversectl new 3 $ multiversectl up 3 worker
For a repository you only edit, with nothing to run, use runtime: none.
Remove a universe and its data
$ multiversectl rm 3 # skip the prompt $ multiversectl rm 3 --yes
rm lists what it will destroy and asks you to type the number. It removes:
- the universe's worktrees (uncommitted work in them is lost);
- its containers and volumes, so every database in it;
- its directory and state file.
The shared clones are not touched. To stop a universe and keep everything, use multiversectl down 3.