watchfire workflow
watchfire workflow shows or changes how a project's sessions branch, where they work and how they finish — finish action, base ref, branch template, remotes, worktree location and parallel lanes.
Show or change how a project's sessions branch, where they work and how they finish.
Usage
watchfire workflow [flags]
Without flags, it prints the current settings. With flags, it changes exactly the settings named and leaves the rest alone.
watchfire workflow --finish pr --base upstream/main
watchfire workflow --push-remote fork --pr-base elastic/kibana
watchfire workflow --setup "yarn kbn bootstrap" --max-parallel 3
The same settings are in the Workflow section of project settings in the GUI.
Flags
| Flag | project.yaml key | Description |
|---|---|---|
--finish <action> | finish_action | What to do with finished work: ask, pr, push, merge, keep_branch or keep_worktree. Empty means the legacy auto-merge settings. |
--pr-draft | pr_draft | Open pull requests as drafts. |
--base <ref> | base_ref | Ref new branches start from, for example upstream/main. It is fetched first. Empty means the current HEAD. |
--branch-template <template> | branch_template | Branch name template. Placeholders: {number}, {slug}, {issue}, {id}. Default: watchfire/{number}-{slug}. |
--push-remote <remote> | push_remote | Remote branches are pushed to. Default: origin. |
--pr-base <owner/name> | pr_base_repo | Repository pull requests target. Default: the push remote's repository. |
--pr-base-branch <branch> | pr_base_branch | Branch pull requests target. Default: derived from --base, else the default branch. |
--worktree-root <dir> | worktree_root | Directory worktrees are created under. Default: <project>/.watchfire/worktrees. |
--setup <command> | setup_command | Command run once in each new worktree, before the agent starts. |
--max-parallel <n> | max_parallel | Sessions watchfire run all uses by default. 0 or 1 means one at a time. |
--reset | Clear every workflow setting, returning the project to its v10 behavior. |
Finish actions
| Action | What happens |
|---|---|
ask | Keep the branch and worktree and wait for watchfire session finish. |
pr | Commit, push, open a pull request. |
push | Commit and push the branch. |
merge | Merge into the branch checked out in the project. |
keep_branch | Commit, remove the worktree, keep the branch. |
keep_worktree | Commit and leave everything in place. |
discard is not a project default. It is only applied when you choose it for a specific session.
With no workflow setting at all, a project behaves exactly as in v10: finished tasks follow auto_merge and auto_delete_branch.
Example: contributing through a fork
watchfire workflow \
--finish pr \
--base upstream/main \
--push-remote fork \
--pr-base elastic/kibana \
--branch-template "fix/{issue}-{slug}"
New branches start from upstream/main, are pushed to your fork remote, and finish as pull requests against elastic/kibana. watchfire init --work-repo applies a similar preset when you first set a project up.
Related
watchfire session
watchfire session starts, lists, attaches to, stops, resumes and finishes agent sessions that run side by side in a project — introduced in Hearth (v11.0.0).
watchfire pr
watchfire pr follows the pull requests Watchfire opened — state, checks and reviews — and opens a follow-up session on a pull request's branch to fix what it needs.