Project config and scripts
Superconductor remembers project-specific commands for setup, run, teardown, and cleanup. Configure these commands in app project settings or in a repository file.
Config file
Section titled “Config file”Store repository-owned script config at:
.superconductor/config.jsonExample:
{ "setup": ["bun install"], "run": ["bun run dev"], "teardown": ["rm -rf tmp/superconductor-preview"]}Superconductor reads the file from the worktree first. If the worktree lacks one, Superconductor falls back to the primary worktree.
Supported commands
Section titled “Supported commands”The config file supports:
setup: commands that prepare a new worktree.run: commands that the run button executes.teardown: commands that run when a worktree is deleted.
Project settings inside the app also support:
pre_cleanup: commands that run before worktree deletion.post_cleanup: commands that run after worktree deletion.
Pre-cleanup and post-cleanup commands come from user-owned project settings, never from repo-owned config. Because they run automatically during deletion, Superconductor refuses to load those cleanup hooks from config.json.
Setup commands
Section titled “Setup commands”Setup commands run when preparing a worktree. Example:
{ "setup": ["bun install --frozen-lockfile"]}Project settings run setup automatically for new worktrees by default. Disable auto-run to trigger setup manually instead.
If setup modifies tracked files, the changes appear in the worktree diff.
Run commands
Section titled “Run commands”Run commands power the run button:
{ "run": ["bun run dev"]}Run commands start development servers, preview servers, test watchers, or other project-specific processes.
When no run command exists, the run pane shows a “Configure run script” button that opens project settings.
Cleanup commands
Section titled “Cleanup commands”Cleanup commands handle teardown around worktree deletion:
pre_cleanupcan block deletion by exiting non-zero.teardownruns when a worktree is deleted.post_cleanupruns after Superconductor removes the worktree.
Cleanup commands stop local services, remove local-only generated files, and clean project-specific runtime state.
Output behavior
Section titled “Output behavior”Project settings include options to clear setup and run output automatically after a command exits.
Choosing config file or app settings
Section titled “Choosing config file or app settings”Choose .superconductor/config.json when the commands belong to the repository workflow and should ship with the project.
Choose app project settings when commands are personal, sensitive, or untrusted from the repo. Cleanup hooks live in app settings because they run during deletion.