wt step
Run individual git workflow operations: commits, squashes, rebases, and pushes.
Examples
Commit with LLM-generated message:
Manual merge workflow with review between steps:
# Review the squashed commit
Operations
commit— Stage and commit with LLM-generated messagesquash— Squash all branch commits into one with LLM-generated messagerebase— Rebase onto target branchpush— Push to target branch (defaults to the default branch)for-each— [experimental] Run a command in every worktree
See also
- wt merge — Runs commit → squash → rebase → hooks → push → cleanup automatically
- wt hook — Run hooks independently
Command reference
wt step - Run individual workflow operations
Usage: wt step [OPTIONS] <COMMAND>
Commands:
commit Commit changes with LLM commit message
squash Squash commits down to target
push Push changes to local target branch
rebase Rebase onto target
for-each [experimental] Run command in each worktree
Options:
-h, --help
Print help (see a summary with '-h')
Global Options:
-C <path>
Working directory for this command
--config <path>
User config file path
-v, --verbose
Show commands and debug info
wt step for-each
Executes a command sequentially in every worktree with real-time output. Continues on failure and shows a summary at the end.
Context JSON is piped to stdin for scripts that need structured data.
Template variables
All variables are shell-escaped:
| Variable | Description |
|---|---|
{{ branch }} | Branch name (raw, e.g., feature/foo) |
{{ branch | sanitize }} | Branch name with / and \ replaced by - |
{{ worktree }} | Absolute path to the worktree |
{{ worktree_name }} | Worktree directory name |
{{ repo }} | Repository name |
{{ repo_root }} | Absolute path to the main repository root |
{{ commit }} | Current HEAD commit SHA (full) |
{{ short_commit }} | Current HEAD commit SHA (7 chars) |
{{ default_branch }} | Default branch name (e.g., "main") |
{{ remote }} | Primary remote name (e.g., "origin") |
{{ remote_url }} | Primary remote URL |
{{ upstream }} | Upstream tracking branch, if configured |
Examples
Check status across all worktrees:
Run npm install in all worktrees:
Use branch name in command:
Pull updates in worktrees with upstreams (skips others):
&&
Note: This command is experimental and may change in future versions.
Command reference
wt step for-each - [experimental] Run command in each worktree
Usage: wt step for-each [OPTIONS] -- <ARGS>...
Arguments:
<ARGS>...
Command template (see --help for all variables)
Options:
-h, --help
Print help (see a summary with '-h')
Global Options:
-C <path>
Working directory for this command
--config <path>
User config file path
-v, --verbose
Show commands and debug info