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>,
prompt_file: Option<PathBuf>,
prompt_stdin: bool,
},
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 {
cache: CacheControl,
},
Delete {
target: Option<String>,
keep_branch: bool,
delete_remote: bool,
force: bool,
no_force: bool,
worktree: bool,
branch: bool,
},
List {
cache: CacheControl,
},
Clean {
cache: CacheControl,
merged: bool,
older_than: Option<u64>,
interactive: bool,
dry_run: bool,
force: bool,
},
Tree {
cache: CacheControl,
},
Stats {
cache: CacheControl,
},
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
Fields
cache: CacheControlDelete
Delete a worktree
Fields
List
List all worktrees
Fields
cache: CacheControlClean
Batch cleanup of worktrees
Note: --no-cache only affects the interactive listing path inside clean
(which calls get_worktree_status). Merge/age-based deletion logic in clean
uses git directly and does not consult the PR cache.
Fields
cache: CacheControlTree
Display worktree hierarchy as a tree
Fields
cache: CacheControlStats
Show worktree statistics
Fields
cache: CacheControlDiff
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 subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more