SupacodeSupacode
Worktree

Repository Settings

Configure base refs, scripts, merge strategy, and per-repository behavior

Repository settings are where Supacode becomes specific to your codebase instead of acting like a generic git worktree launcher.

What you can configure

From the repository settings UI, you can change:

  • default base ref for new worktrees
  • whether ignored files are copied on create
  • whether untracked files are copied on create
  • PR merge strategy
  • setup script
  • archive script
  • run script

Supacode also persists the selected "Open in" target for each repository.

Opening worktrees in Zed

When the "Open in" target is Zed, Supacode opens each worktree as its own Zed window, and focuses the existing window when that worktree is already open.

This relies on Zed's cli_default_open_behavior setting being new_window. Zed's default is existing_window, which makes every worktree collapse into a single shared window. Set it from Zed via zed://settings/cli_default_open_behavior, or add to your Zed settings.json:

"cli_default_open_behavior": "new_window"

On-disk file

If a repository contains a supacode.json file at its root, Supacode reads and writes repository settings there.

If no supacode.json exists, Supacode stores repository settings inside ~/.supacode/settings.json under the repositories map.

Example supacode.json

{
  "setupScript": "codex",
  "archiveScript": "docker compose down",
  "runScript": "pnpm dev",
  "openActionID": "cursor",
  "worktreeBaseRef": "origin/main",
  "copyIgnoredOnWorktreeCreate": false,
  "copyUntrackedOnWorktreeCreate": false,
  "pullRequestMergeStrategy": "squash"
}

Base ref tips

Use a repository base ref when:

  • work should almost always branch from origin/main
  • you have a release branch that should be the normal starting point
  • you want prompted worktree creation to stay consistent across the team

On this page