Skip to Content
WorkflowsEdit & Duplicate

Edit and Duplicate Workflows

WorktreeWise makes it straightforward to update existing workflows, modify command sequences, or clone workflows to create specialized task variants.


How to Edit a Workflow

  1. In the Workflows view, locate the workflow in the Saved Workflows table.
  2. In the Actions column, select the Pencil icon (✏️).
  3. The Edit Workflow drawer slides open from the right:
    • Rename: Change the title of the workflow.
    • Edit Commands: Update command text directly in the input fields.
    • Remove Steps: Select the red trash icon next to any step to remove that command from the sequence.
    • Add Steps: Select Add Command to append new commands to the end of the chain.
  4. Select Save to commit your updates.

Full Edit Workflow drawer

Editing a workflow updates its definition in .git/WorktreeWise/<name>/details.json immediately. Subsequent workflow runs will execute the updated commands, while historical execution logs remain preserved.


Duplicating a Workflow

Duplicating allows you to create specialized variants of existing workflows (for example, creating a fast test variant that skips integration suites, or a staging deployment workflow):

  1. Locate the workflow in the Saved Workflows table.
  2. Select the Duplicate icon (📋) in the Actions column.
  3. WorktreeWise creates a copy named [Original Name] copy.
  4. Select the Pencil icon on the duplicate to rename it and adjust commands.

Command Safety Guidelines

When editing workflow commands:

  • Avoid Unbounded Daemons: Avoid launching background daemon processes without an explicit termination step, as background processes may hold file locks or network ports open across worktrees.
  • Environment Variable Expansion: If a step relies on environment variables created during worktree provisioning, use standard shell syntax ($PORT or %PORT%).