pub enum Commands {
Show 33 variants
New {
name: String,
path: Option<String>,
base: Option<String>,
no_term: bool,
term: Option<String>,
bg: bool,
prompt: Option<String>,
},
Pr {
branch: Option<String>,
title: Option<String>,
body: Option<String>,
draft: bool,
no_push: bool,
worktree: bool,
by_branch: bool,
},
Merge {
branch: Option<String>,
interactive: bool,
dry_run: bool,
push: bool,
ai_merge: bool,
worktree: bool,
},
Resume {
branch: Option<String>,
term: Option<String>,
bg: bool,
worktree: bool,
by_branch: bool,
},
Shell {
worktree: Option<String>,
args: Vec<String>,
},
Status,
Delete {
target: Option<String>,
keep_branch: bool,
delete_remote: bool,
force: bool,
no_force: bool,
worktree: bool,
branch: bool,
},
List,
Clean {
merged: bool,
older_than: Option<u64>,
interactive: bool,
dry_run: bool,
},
Tree,
Stats,
Diff {
branch1: String,
branch2: String,
summary: bool,
files: bool,
},
Sync {
branch: Option<String>,
all: bool,
fetch_only: bool,
ai_merge: bool,
worktree: bool,
by_branch: bool,
},
ChangeBase {
new_base: String,
branch: Option<String>,
dry_run: bool,
interactive: bool,
worktree: bool,
by_branch: bool,
},
Config {
action: ConfigAction,
},
Backup {
action: BackupAction,
},
Stash {
action: StashAction,
},
Hook {
action: HookAction,
},
Export {
output: Option<String>,
},
Import {
import_file: String,
apply: bool,
},
Scan {
dir: Option<PathBuf>,
},
Prune,
Doctor,
Upgrade,
SetupClaude,
ShellSetup,
Path {
branch: Option<String>,
list_branches: bool,
interactive: bool,
},
ShellFunction {
shell: String,
},
ConfigKeys,
UpdateCache,
TermValues,
PresetNames,
HookEvents,
}Variants§
New
Create new worktree for feature branch
Fields
Pr
Create GitHub Pull Request from worktree
Fields
Merge
Merge feature branch into base branch
Fields
Resume
Resume AI work in a worktree
Fields
Shell
Open interactive shell or execute command in a worktree
Fields
Status
Show current worktree status
Delete
Delete a worktree
Fields
List
List all worktrees
Clean
Batch cleanup of worktrees
Fields
Tree
Display worktree hierarchy as a tree
Stats
Show worktree statistics
Diff
Compare two branches
Fields
Sync
Sync worktree with base branch
Fields
ChangeBase
Change base branch for a worktree
Fields
Config
Configuration management
Fields
action: ConfigActionBackup
Backup and restore worktrees
Fields
action: BackupActionStash
Stash management (worktree-aware)
Fields
action: StashActionHook
Manage lifecycle hooks
Fields
action: HookActionExport
Export worktree configuration to a file
Import
Import worktree configuration from a file
Fields
Scan
Scan for repositories (global mode)
Prune
Clean up stale registry entries (global mode)
Doctor
Run diagnostics
Upgrade
Check for updates / upgrade
SetupClaude
Install Claude Code skill for worktree task delegation
ShellSetup
Interactive shell integration setup
Path
[Internal] Get worktree path for a branch
Fields
ShellFunction
Generate shell function for gw-cd / cw-cd
ConfigKeys
List config keys (for tab completion)
UpdateCache
Refresh update cache (background process)
TermValues
List terminal launch method values (for tab completion)
PresetNames
List preset names (for tab completion)
HookEvents
List hook event names (for tab completion)
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand