Skip to content
variantly

Safety

What happens to your repository, your uncommitted work and a design you keep, and how to undo it.

What it does to your repo

Plain git, nothing hidden. Every step below links to the code that does it, in the open-source repository (MIT licence).

  1. Your uncommitted edits are snapshotted, not touched

    Before a run, git stash create turns uncommitted changes to tracked files into a commit without changing your folder, your index or your stash list. Designs start from exactly what you see. Untracked files are not in the snapshot.

    src/git.mjs
  2. Each design gets its own worktree and branch

    Variant n is a git worktree on branch variantly/<run>/v<n>, under ~/.variantly/, outside your folder. The agent works only there. node_modules is linked in and .env-style files are copied, so an agent editing them cannot reach yours.

    src/git.mjs
  3. variantly commits the agent’s work to that branch

    The agent is told not to commit; variantly does it, as author “variantly”, with hooks skipped. Your branches and your checkout stay where they were.

    src/git.mjs
  4. Keep applies one diff, unstaged

    The kept branch’s diff is applied to your working tree with git apply, falling back to a three-way merge if you edited the same files meanwhile; overlaps are left as conflict markers. Nothing is staged or committed: review it with git diff.

    src/git.mjs
  5. The other designs stay as branches

    After a keep the worktrees are removed but every variantly/… branch stays, so nothing is lost. npx variantly clean deletes the worktrees, those branches and the state folder.

    bin/variantly.mjs
  6. Rolling back

    Before Keep there is nothing to undo: your folder is unchanged. After Keep, git restore <file> (or git checkout -- <file>) drops the change, and the kept branch is still there to re-apply.

    src/session.mjs
Know before you run it
  • No commits yet? The wizard offers to make the first one for you: it runs git add -A and commits everything not gitignored as “Before variantly”. Check your .gitignore covers secrets first.
  • Undoing a keep with git restore also discards your own uncommitted edits in those files. Commit your work before you press Keep.
  • Agents run unattended. By default they may edit files and run only a short list of read-only commands; the wizard’s full-permissions option drops those limits. A worktree keeps edits out of your folder, but it is not a sandbox for your machine.
  • Keep rolls the design out to the rest of the site first (one more agent run). Use --no-rollout to apply only the pages the variants redesigned.
  • Changed dependencies (package.json, lockfiles…) are applied like any file; run your install command afterwards.
  • Each design is one session on your AI plan. variantly brings no model and sends nothing to its own servers; the agent you choose talks to its provider as usual.

Common questions

Do I need to be a developer?
No. If you can paste a command, you’re set. Your AI assistant does the design work, and can set variantly up for you: send it this page.
What does it cost?
variantly is free and open source. Each design = one AI session on your own plan. Start with four.
Can it break my site?
Not while you compare: designs are made in separate git worktrees, outside your folder. Keep applies one design to your files as an unstaged change for you to review; if it is wrong, undo it with git. See what it does to your repo.
What if I don’t like any of them?
Run it again with a sharper brief. Nothing is kept unless you press Keep.