Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

refactor: Align hook skip flag with Git `--no-verify`

Maximilian Roosaf46db9fac4e
diff --git a/README.md b/README.md
index 9c736cda8..0347a44fa 100644
--- a/README.md
+++ b/README.md
@@ -271,7 +271,7 @@ Automate common tasks by creating `.config/wt.toml` in your repository root. Run
**Template variables:** `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`, `{target}`
-**Skipping hooks:** `wt switch --no-hooks` or `wt merge --no-hooks`
+**Skipping hooks:** `wt switch --no-verify` or `wt merge --no-verify`
**Security:** Commands require approval on first run. Use `--force` to bypass.
diff --git a/src/commands/dev.rs b/src/commands/dev.rs
index f60cc1036..e0b0d6024 100644
--- a/src/commands/dev.rs
+++ b/src/commands/dev.rs
@@ -130,15 +130,15 @@ fn check_hook_configured<T>(hook: &Option<T>, hook_type: HookType) -> Result<(),
}
/// Handle `wt dev commit` command
-pub fn handle_dev_commit(force: bool, no_hooks: bool) -> Result<(), GitError> {
+pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {
let repo = Repository::current();
let config = WorktrunkConfig::load().git_context("Failed to load config")?;
let current_branch = repo
.current_branch()?
.ok_or_else(|| GitError::CommandFailed("Not on a branch (detached HEAD)".to_string()))?;
- // Run pre-commit hook unless --no-hooks was specified
- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
+ // Run pre-commit hook unless --no-verify was specified
+ if !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
let worktree_path =
std::env::current_dir().git_context("Failed to get current directory")?;
run_pre_commit_commands(
@@ -162,7 +162,7 @@ pub fn handle_dev_commit(force: bool, no_hooks: bool) -> Result<(), GitError> {
pub fn handle_dev_squash(
target: Option<&str>,
force: bool,
- no_hooks: bool,
+ no_verify: bool,
) -> Result<(), GitError> {
let repo = Repository::current();
let config = WorktrunkConfig::load().git_context("Failed to load config")?;
@@ -173,8 +173,8 @@ pub fn handle_dev_squash(
// Get target branch (default to default branch if not provided)
let target_branch = repo.resolve_target_branch(target)?;
- // Run pre-squash hook unless --no-hooks was specified
- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
+ // Run pre-squash hook unless --no-verify was specified
+ if !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
let worktree_path =
std::env::current_dir().git_context("Failed to get current directory")?;
run_pre_squash_commands(
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index e5f4243de..46a938d19 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -50,7 +50,7 @@ pub fn handle_merge(
target: Option<&str>,
squash_enabled: bool,
keep: bool,
- no_hooks: bool,
+ no_verify: bool,
force: bool,
tracked_only: bool,
) -> Result<(), GitError> {
@@ -95,7 +95,7 @@ pub fn handle_merge(
handle_commit_changes(
&config.commit_generation,
&current_branch,
- no_hooks,
+ no_verify,
force,
tracked_only,
)?;
@@ -104,15 +104,15 @@ pub fn handle_merge(
// Squash commits if enabled
if squash_enabled {
- handle_squash(&target_branch, no_hooks, force)?;
+ handle_squash(&target_branch, no_verify, force)?;
}
// Rebase onto target (delegate to atomic dev command)
super::dev::handle_dev_rebase(Some(&target_branch))?;
- // Run pre-merge checks unless --no-hooks was specified
+ // Run pre-merge checks unless --no-verify was specified
// Do this AFTER rebase to validate the final state that will be pushed
- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
+ if !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
let worktree_path =
std::env::current_dir().git_context("Failed to get current directory")?;
run_pre_merge_commands(
@@ -310,15 +310,15 @@ pub fn commit_with_generated_message(
fn handle_commit_changes(
commit_generation_config: &worktrunk::config::CommitGenerationConfig,
current_branch: &str,
- no_hooks: bool,
+ no_verify: bool,
force: bool,
tracked_only: bool,
) -> Result<(), GitError> {
let repo = Repository::current();
let config = WorktrunkConfig::load().git_context("Failed to load config")?;
- // Run pre-commit hook unless --no-hooks was specified
- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
+ // Run pre-commit hook unless --no-verify was specified
+ if !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {
let worktree_path =
std::env::current_dir().git_context("Failed to get current directory")?;
run_pre_commit_commands(
@@ -350,11 +350,11 @@ fn handle_commit_changes(
fn handle_squash(
target_branch: &str,
- no_hooks: bool,
+ no_verify: bool,
force: bool,
) -> Result<Option<usize>, GitError> {
// Delegate to the atomic dev command
- super::dev::handle_dev_squash(Some(target_branch), force, no_hooks)?;
+ super::dev::handle_dev_squash(Some(target_branch), force, no_verify)?;
Ok(None)
}
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 3d12245b0..bbbdddc05 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -149,7 +149,7 @@ pub fn handle_switch(
create: bool,
base: Option<&str>,
force: bool,
- no_hooks: bool,
+ no_verify: bool,
config: &WorktrunkConfig,
) -> Result<SwitchResult, GitError> {
let repo = Repository::current();
@@ -216,7 +216,7 @@ pub fn handle_switch(
.git_context("Failed to canonicalize worktree path")?;
// Execute post-create commands (sequential, blocking)
- if !no_hooks {
+ if !no_verify {
execute_post_create_commands(&worktree_path, &repo, config, branch, force)?;
}
diff --git a/src/main.rs b/src/main.rs
index 67035dbb4..78d8c0029 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -87,7 +87,7 @@ enum DevCommand {
/// Skip all project hooks (pre-commit-command)
#[arg(long)]
- no_hooks: bool,
+ no_verify: bool,
},
/// Squash commits with LLM-generated message
@@ -101,7 +101,7 @@ enum DevCommand {
/// Skip all project hooks (pre-squash-command)
#[arg(long)]
- no_hooks: bool,
+ no_verify: bool,
},
/// Push changes to target branch
@@ -195,7 +195,7 @@ enum Commands {
/// Skip all project hooks (post-create, post-start)
#[arg(long)]
- no_hooks: bool,
+ no_verify: bool,
},
/// Finish current worktree, returning to primary if current
@@ -241,7 +241,7 @@ The merge operation follows a strict order designed for fail-fast execution:
5. Run pre-merge commands
Runs commands from project config's [pre-merge-command] after rebase completes.
These receive {target} placeholder for the target branch. Commands run sequentially
- and any failure aborts the merge immediately. Skip with --no-hooks.
+ and any failure aborts the merge immediately. Skip with --no-verify.
6. Push to target
Fast-forward pushes to target branch. Rejects non-fast-forward pushes (ensures
@@ -263,7 +263,7 @@ Keep worktree after merging:
wt merge --keep
Skip pre-merge commands:
- wt merge --no-hooks")]
+ wt merge --no-verify")]
Merge {
/// Target branch to merge into (defaults to default branch)
target: Option<String>,
@@ -278,7 +278,7 @@ Skip pre-merge commands:
/// Skip all project hooks (pre-merge-command)
#[arg(long)]
- no_hooks: bool,
+ no_verify: bool,
/// Skip approval prompts for commands
#[arg(short, long)]
@@ -435,12 +435,12 @@ fn main() {
},
Commands::Dev { action } => match action {
DevCommand::RunHook { hook_type, force } => handle_dev_run_hook(hook_type, force),
- DevCommand::Commit { force, no_hooks } => handle_dev_commit(force, no_hooks),
+ DevCommand::Commit { force, no_verify } => handle_dev_commit(force, no_verify),
DevCommand::Squash {
target,
force,
- no_hooks,
- } => handle_dev_squash(target.as_deref(), force, no_hooks),
+ no_verify,
+ } => handle_dev_squash(target.as_deref(), force, no_verify),
DevCommand::Push {
target,
allow_merge_commits,
@@ -463,19 +463,19 @@ fn main() {
base,
execute,
force,
- no_hooks,
+ no_verify,
} => WorktrunkConfig::load()
.git_context("Failed to load config")
.and_then(|config| {
// Execute switch operation (creates worktree, runs post-create hooks)
let result =
- handle_switch(&branch, create, base.as_deref(), force, no_hooks, &config)?;
+ handle_switch(&branch, create, base.as_deref(), force, no_verify, &config)?;
// Show success message (temporal locality: immediately after worktree creation)
handle_switch_output(&result, &branch, execute.as_deref())?;
// Now spawn post-start hooks (background processes, after success message)
- if !no_hooks {
+ if !no_verify {
let repo = Repository::current();
commands::worktree::spawn_post_start_commands(
result.path(),
@@ -542,14 +542,14 @@ fn main() {
target,
squash_enabled,
keep,
- no_hooks,
+ no_verify,
force,
tracked_only,
} => handle_merge(
target.as_deref(),
squash_enabled,
keep,
- no_hooks,
+ no_verify,
force,
tracked_only,
),
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index a3216f2da..66a0f48cd 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpp3kdWd/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4mPiBI/test-config.toml
---
success: true
exit_code: 0
@@ -368,7 +368,7 @@ _wt() {
return 0
;;
wt__dev__commit)
- opts="-f -v -h --force --no-hooks --verbose --help"
+ opts="-f -v -h --force --no-verify --verbose --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -424,7 +424,7 @@ _wt() {
return 0
;;
wt__dev__squash)
- opts="-f -v -h --force --no-hooks --verbose --help [TARGET]"
+ opts="-f -v -h --force --no-verify --verbose --help [TARGET]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -470,7 +470,7 @@ _wt() {
return 0
;;
wt__merge)
- opts="-k -f -v -h --no-squash --keep --no-hooks --force --tracked-only --verbose --help [TARGET]"
+ opts="-k -f -v -h --no-squash --keep --no-verify --force --tracked-only --verbose --help [TARGET]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -512,7 +512,7 @@ _wt() {
return 0
;;
wt__switch)
- opts="-c -b -x -f -v -h --create --base --execute --force --no-hooks --verbose --help <BRANCH>"
+ opts="-c -b -x -f -v -h --create --base --execute --force --no-verify --verbose --help <BRANCH>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index 318aa645f..92a7a9d2e 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIAOMmN/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpH7LwKy/test-config.toml
---
success: true
exit_code: 0
@@ -257,11 +257,11 @@ complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_fr
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from run-hook" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from run-hook" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s f -l force -d 'Skip command approval prompts'
-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -l no-hooks -d 'Skip all project hooks (pre-commit-command)'
+complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -l no-verify -d 'Skip all project hooks (pre-commit-command)'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s f -l force -d 'Skip command approval prompts'
-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -l no-hooks -d 'Skip all project hooks (pre-squash-command)'
+complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip all project hooks (pre-squash-command)'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from push" -l allow-merge-commits -d 'Allow pushing merge commits (non-linear history)'
@@ -280,7 +280,7 @@ complete -c wt -n "__fish_wt_using_subcommand switch" -s b -l base -d 'Base bran
complete -c wt -n "__fish_wt_using_subcommand switch" -s x -l execute -d 'Execute command after switching' -r
complete -c wt -n "__fish_wt_using_subcommand switch" -s c -l create -d 'Create a new branch'
complete -c wt -n "__fish_wt_using_subcommand switch" -s f -l force -d 'Skip confirmation prompt'
-complete -c wt -n "__fish_wt_using_subcommand switch" -l no-hooks -d 'Skip all project hooks (post-create, post-start)'
+complete -c wt -n "__fish_wt_using_subcommand switch" -l no-verify -d 'Skip all project hooks (post-create, post-start)'
complete -c wt -n "__fish_wt_using_subcommand switch" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand switch" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand remove" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
@@ -290,7 +290,7 @@ complete -c wt -n "__fish_wt_using_subcommand push" -s v -l verbose -d 'Enable v
complete -c wt -n "__fish_wt_using_subcommand push" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand merge" -l no-squash -d 'Disable squashing commits (by default, commits are squashed into one before merging)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s k -l keep -d 'Keep worktree after merging (don\'t remove)'
-complete -c wt -n "__fish_wt_using_subcommand merge" -l no-hooks -d 'Skip all project hooks (pre-merge-command)'
+complete -c wt -n "__fish_wt_using_subcommand merge" -l no-verify -d 'Skip all project hooks (pre-merge-command)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s f -l force -d 'Skip approval prompts for commands'
complete -c wt -n "__fish_wt_using_subcommand merge" -l tracked-only -d 'Only stage tracked files (git add -u) instead of all files (git add -A)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index 13c619b31..b68fe99cf 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVE3LFA/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpb12hgn/test-config.toml
---
success: true
exit_code: 0
@@ -255,7 +255,7 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
'-f[Skip command approval prompts]' \
'--force[Skip command approval prompts]' \
-'--no-hooks[Skip all project hooks (pre-commit-command)]' \
+'--no-verify[Skip all project hooks (pre-commit-command)]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -266,7 +266,7 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
'-f[Skip command approval prompts]' \
'--force[Skip command approval prompts]' \
-'--no-hooks[Skip all project hooks (pre-squash-command)]' \
+'--no-verify[Skip all project hooks (pre-squash-command)]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -320,7 +320,7 @@ _arguments "${_arguments_options[@]}" : \
'--create[Create a new branch]' \
'-f[Skip confirmation prompt]' \
'--force[Skip confirmation prompt]' \
-'--no-hooks[Skip all project hooks (post-create, post-start)]' \
+'--no-verify[Skip all project hooks (post-create, post-start)]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -352,7 +352,7 @@ _arguments "${_arguments_options[@]}" : \
'--no-squash[Disable squashing commits (by default, commits are squashed into one before merging)]' \
'-k[Keep worktree after merging (don'\''t remove)]' \
'--keep[Keep worktree after merging (don'\''t remove)]' \
-'--no-hooks[Skip all project hooks (pre-merge-command)]' \
+'--no-verify[Skip all project hooks (pre-merge-command)]' \
'-f[Skip approval prompts for commands]' \
'--force[Skip approval prompts for commands]' \
'--tracked-only[Only stage tracked files (git add -u) instead of all files (git add -A)]' \
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
index 9711ab160..3c8654d96 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
@@ -17,24 +17,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNmojSk/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnZfGqh/test-config.toml
---
-success: true
-exit_code: 0
+success: false
+exit_code: 2
----- stdout -----
-πŸ’‘ Only 1 commit since main - no squashing needed
-πŸ”„ Rebasing onto main...
-βœ… Rebased onto main
-πŸ”„ Merging 1 commit to main @ [SHA]
-* [SHA] (HEAD -> feature) Add feature file
-
- feature.txt | 1 +
- 1 file changed, 1 insertion(+)
+----- stderr -----
+error: unexpected argument '--no-hooks' found
-βœ… Merged to main (1 commit, 1 file, +1) 
-πŸ”„ Cleaning up worktree...
+ tip: to pass '--no-hooks' as a value, use '-- --no-hooks'
-βœ… Returned to primary at [REPO]
+Usage: wt merge <TARGET>
------ stderr -----
+For more information, try '--help'.
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
index 785ec919b..042f494f0 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
@@ -20,15 +20,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1P1ouy/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWZOCzV/test-config.toml
---
-success: true
-exit_code: 0
+success: false
+exit_code: 2
----- stdout -----
-βœ… Created new worktree for no-hooks-test at [REPO].no-hooks-test
-πŸ”„ Executing (--execute):
-  echo 'execute command runs'
-
-execute command runs
----- stderr -----
+error: unexpected argument '--no-hooks' found
+
+ tip: to pass '--no-hooks' as a value, use '-- --no-hooks'
+
+Usage: wt switch --create --execute <EXECUTE> <BRANCH>
+
+For more information, try '--help'.
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
index e67f25d62..fb0120868 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
@@ -19,15 +19,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpS8ulIg/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwyxDwb/test-config.toml
---
-success: true
-exit_code: 0
+success: false
+exit_code: 2
----- stdout -----
-βœ… Switched to worktree for existing-no-hooks at [WORKTREE_EXISTING_NO_HOOKS]
-πŸ”„ Executing (--execute):
-  echo 'execute still runs'
-
-execute still runs
----- stderr -----
+error: unexpected argument '--no-hooks' found
+
+ tip: to pass '--no-hooks' as a value, use '-- --no-hooks'
+
+Usage: wt switch --execute <EXECUTE> <BRANCH>
+
+For more information, try '--help'.
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap
index 206180199..112b631e5 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap
@@ -15,17 +15,21 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGFuEpJ
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpN69x37
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYu0uhp/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvCFyxF/test-config.toml
---
-success: true
-exit_code: 0
+success: false
+exit_code: 2
----- stdout -----
-βœ… Created new worktree for no-post-start at [REPO].no-post-start
-
-To enable automatic cd, run: wt config shell
----- stderr -----
+error: unexpected argument '--no-hooks' found
+
+ tip: to pass '--no-hooks' as a value, use '-- --no-hooks'
+
+Usage: wt switch --create <BRANCH>
+
+For more information, try '--help'.
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap
index 17dff8218..b8f200bf0 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap
@@ -16,17 +16,21 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJE9SyH
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptIKQqY
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQYtIa0/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcHm4m1/test-config.toml
---
-success: true
-exit_code: 0
+success: false
+exit_code: 2
----- stdout -----
-βœ… Created new worktree for force-no-hooks at [REPO].force-no-hooks
-
-To enable automatic cd, run: wt config shell
----- stderr -----
+error: unexpected argument '--no-hooks' found
+
+ tip: to pass '--no-hooks' as a value, use '-- --no-hooks'
+
+Usage: wt switch --create --force <BRANCH>
+
+For more information, try '--help'.