Installation
Variant Worktrees goes into the project you already have. Both ways below end the same: a variants.yaml in your repository that says what a variant runs. Install the editor extension, or the CLI through mise; they work side by side.
VS Code and Cursor extension
Tested with Cursor.
- Install the Variant Worktrees extension from the Extensions view of your editor (search for
Variant Worktrees), or from the Visual Studio Marketplace or Open VSX. - Open your project. A Variant Worktrees section appears in the Explorer.
- Follow its Onboarding: when the project has no
variants.yaml, the section says that variants are not initialized and offers Onboard. It opens the same initialization dialog as Variant: Initialize in this Repo; confirm with Initialize, and the three steps ofinitdescribed below run in your main checkout.
After onboarding the section lists your variants, and you can create, watch and implode them from there. Extension describes everything it does, including registering the MCP Server for your agents.
mise CLI
mise installs the tools a project asks for and puts them on your PATH when you enter that directory. Install mise first, with Homebrew or with the installer script:
brew install mise
# or
curl https://mise.run | shThen, in your own project:
cd path/to/your/project
mise x github:jubr/variant-worktrees@latest -- variant initmise x fetches the latest release of variant from GitHub into mise's cache and runs variant init with it. init looks at your project and does up to three things, each of which you can turn off:
- writes
variants.yamlfrom what it detects: the database (Postgres, MySQL, MariaDB or SQLite) frommise.local.tomlor the environment, a short project label, and one watch for every Vite or NestJS app. A password becomes a${NAME}reference and is never written. - adds
_v-*to.gitignore, so the worktrees of your variants stay out of git. - adds
github:jubr/variant-worktreesto your mise configuration (mise.tomlis created when there is none). Nothing is installed by that edit; runmise installandvariantis on yourPATHwhenever you are in the project.
Review the result with git diff, adjust variants.yaml (see Configuration), and commit it. The flags of init, such as --prefix and the --file=false, --gitignore=false and --mise=false switches, are in variant init.
