Skip to content

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

feat: reduce background hook output verbosity (#740)

Maximilian Roosfb011c37dd21
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.md
index 7315d2901..199fc8359 100644
--- a/.claude-plugin/skills/worktrunk/reference/config.md
+++ b/.claude-plugin/skills/worktrunk/reference/config.md
@@ -405,7 +405,7 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config show
@@ -447,7 +447,7 @@ Usage: <b><span class=c>wt config show</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config state
@@ -522,7 +522,7 @@ Usage: <b><span class=c>wt config state</span></b> <span class=c>[OPTIONS]</span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config state default-branch
@@ -574,7 +574,7 @@ Usage: <b><span class=c>wt config state default-branch</span></b> <span class=c>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config state ci-status
@@ -624,7 +624,7 @@ Usage: <b><span class=c>wt config state ci-status</span></b> <span class=c>[OPTI
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config state marker
@@ -680,7 +680,7 @@ Usage: <b><span class=c>wt config state marker</span></b> <span class=c>[OPTIONS
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt config state logs
@@ -744,4 +744,4 @@ Usage: <b><span class=c>wt config state logs</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/hook.md b/.claude-plugin/skills/worktrunk/reference/hook.md
index eb66e55cf..19c8baf4e 100644
--- a/.claude-plugin/skills/worktrunk/reference/hook.md
+++ b/.claude-plugin/skills/worktrunk/reference/hook.md
@@ -19,6 +19,8 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au
**Blocking**: Command waits for hook to complete before continuing.
**Fail-fast**: First failure aborts the operation.
+Background hooks show a single-line summary by default. Use `-v` to see expanded command details.
+
### post-start
Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
@@ -429,7 +431,7 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt hook approvals
@@ -478,4 +480,4 @@ Usage: <b><span class=c>wt hook approvals</span></b> <span class=c>[OPTIONS]</sp
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/list.md b/.claude-plugin/skills/worktrunk/reference/list.md
index 6fb44c21c..3fa3df3e2 100644
--- a/.claude-plugin/skills/worktrunk/reference/list.md
+++ b/.claude-plugin/skills/worktrunk/reference/list.md
@@ -281,4 +281,4 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/merge.md b/.claude-plugin/skills/worktrunk/reference/merge.md
index 333c0749e..dbe838cb0 100644
--- a/.claude-plugin/skills/worktrunk/reference/merge.md
+++ b/.claude-plugin/skills/worktrunk/reference/merge.md
@@ -117,4 +117,4 @@ Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/remove.md b/.claude-plugin/skills/worktrunk/reference/remove.md
index 7170baaf6..7582ab3a6 100644
--- a/.claude-plugin/skills/worktrunk/reference/remove.md
+++ b/.claude-plugin/skills/worktrunk/reference/remove.md
@@ -111,4 +111,4 @@ Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/select.md b/.claude-plugin/skills/worktrunk/reference/select.md
index 0235996e5..e635c855a 100644
--- a/.claude-plugin/skills/worktrunk/reference/select.md
+++ b/.claude-plugin/skills/worktrunk/reference/select.md
@@ -72,4 +72,4 @@ Usage: <b><span class=c>wt select</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/step.md b/.claude-plugin/skills/worktrunk/reference/step.md
index 7aba69b74..63cfbb31f 100644
--- a/.claude-plugin/skills/worktrunk/reference/step.md
+++ b/.claude-plugin/skills/worktrunk/reference/step.md
@@ -57,7 +57,7 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt step commit
@@ -138,7 +138,7 @@ Usage: <b><span class=c>wt step commit</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt step squash
@@ -222,7 +222,7 @@ Usage: <b><span class=c>wt step squash</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt step copy-ignored
@@ -343,7 +343,7 @@ Usage: <b><span class=c>wt step copy-ignored</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
## wt step for-each
@@ -405,4 +405,4 @@ Usage: <b><span class=c>wt step for-each</span></b> <span class=c>[OPTIONS]</spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/.claude-plugin/skills/worktrunk/reference/switch.md b/.claude-plugin/skills/worktrunk/reference/switch.md
index 8312b9626..e2dc30538 100644
--- a/.claude-plugin/skills/worktrunk/reference/switch.md
+++ b/.claude-plugin/skills/worktrunk/reference/switch.md
@@ -150,4 +150,4 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/docs/content/config.md b/docs/content/config.md
index 5aa9ac375..b8d2ceea2 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -414,7 +414,7 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config show
@@ -458,7 +458,7 @@ Usage: <b><span class=c>wt config show</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config state
@@ -535,7 +535,7 @@ Usage: <b><span class=c>wt config state</span></b> <span class=c>[OPTIONS]</span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config state default-branch
@@ -589,7 +589,7 @@ Usage: <b><span class=c>wt config state default-branch</span></b> <span class=c>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config state ci-status
@@ -641,7 +641,7 @@ Usage: <b><span class=c>wt config state ci-status</span></b> <span class=c>[OPTI
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config state marker
@@ -699,7 +699,7 @@ Usage: <b><span class=c>wt config state marker</span></b> <span class=c>[OPTIONS
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt config state logs
@@ -765,7 +765,7 @@ Usage: <b><span class=c>wt config state logs</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt config --help-page` -->
diff --git a/docs/content/hook.md b/docs/content/hook.md
index 48a5bc73e..5a31c83ab 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -27,6 +27,8 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au
**Blocking**: Command waits for hook to complete before continuing.
**Fail-fast**: First failure aborts the operation.
+Background hooks show a single-line summary by default. Use `-v` to see expanded command details.
+
### post-start
Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
@@ -444,7 +446,7 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt hook approvals
@@ -495,7 +497,7 @@ Usage: <b><span class=c>wt hook approvals</span></b> <span class=c>[OPTIONS]</sp
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt hook --help-page` -->
diff --git a/docs/content/list.md b/docs/content/list.md
index 4ec54c25e..2a677007c 100644
--- a/docs/content/list.md
+++ b/docs/content/list.md
@@ -319,7 +319,7 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt list --help-page` -->
diff --git a/docs/content/merge.md b/docs/content/merge.md
index 4746c2bf4..c09099d06 100644
--- a/docs/content/merge.md
+++ b/docs/content/merge.md
@@ -139,7 +139,7 @@ Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt merge --help-page` -->
diff --git a/docs/content/remove.md b/docs/content/remove.md
index 515b8b479..b1494b97a 100644
--- a/docs/content/remove.md
+++ b/docs/content/remove.md
@@ -125,7 +125,7 @@ Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt remove --help-page` -->
diff --git a/docs/content/select.md b/docs/content/select.md
index 75f46c5ac..71f2deede 100644
--- a/docs/content/select.md
+++ b/docs/content/select.md
@@ -95,7 +95,7 @@ Usage: <b><span class=c>wt select</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt select --help-page` -->
diff --git a/docs/content/step.md b/docs/content/step.md
index 84d6a49ae..d998b0814 100644
--- a/docs/content/step.md
+++ b/docs/content/step.md
@@ -71,7 +71,7 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt step commit
@@ -154,7 +154,7 @@ Usage: <b><span class=c>wt step commit</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt step squash
@@ -240,7 +240,7 @@ Usage: <b><span class=c>wt step squash</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt step copy-ignored
@@ -363,7 +363,7 @@ Usage: <b><span class=c>wt step copy-ignored</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
## wt step for-each
@@ -427,7 +427,7 @@ Usage: <b><span class=c>wt step for-each</span></b> <span class=c>[OPTIONS]</spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt step --help-page` -->
diff --git a/docs/content/switch.md b/docs/content/switch.md
index c2a253835..e8dfc4d90 100644
--- a/docs/content/switch.md
+++ b/docs/content/switch.md
@@ -172,7 +172,7 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
<!-- END AUTO-GENERATED from `wt switch --help-page` -->
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index ac3a3e46e..e1b868626 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -225,7 +225,7 @@ pub(crate) struct Cli {
)]
pub config: Option<std::path::PathBuf>,
- /// Show debug info and write diagnostic report (-vv)
+ /// Verbose output (-v: hooks, templates; -vv: debug report)
#[arg(
long,
short = 'v',
@@ -1037,6 +1037,8 @@ wt step push
**Blocking**: Command waits for hook to complete before continuing.
**Fail-fast**: First failure aborts the operation.
+Background hooks show a single-line summary by default. Use `-v` to see expanded command details.
+
### post-start
Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
diff --git a/src/commands/hooks.rs b/src/commands/hooks.rs
index bcc8462c9..1e745c5c3 100644
--- a/src/commands/hooks.rs
+++ b/src/commands/hooks.rs
@@ -6,7 +6,7 @@ use worktrunk::config::CommandConfig;
use worktrunk::git::WorktrunkError;
use worktrunk::path::format_path_for_display;
use worktrunk::styling::{
- error_message, format_bash_with_gutter, progress_message, warning_message,
+ error_message, format_bash_with_gutter, progress_message, verbosity, warning_message,
};
use super::command_executor::{CommandContext, PreparedCommand, prepare_commands};
@@ -24,6 +24,14 @@ pub struct SourcedCommand {
}
impl SourcedCommand {
+ /// Short name for summary display: "user:name" or just "user" if unnamed.
+ fn summary_name(&self) -> String {
+ match &self.prepared.name {
+ Some(n) => format!("{}:{}", self.source, n),
+ None => self.source.to_string(),
+ }
+ }
+
/// Announce this command before execution.
///
/// Format: "Running pre-merge user:foo:" for named, "Running post-create user hook:" for unnamed
@@ -139,6 +147,9 @@ fn filter_by_name(
///
/// Used for post-start and post-switch hooks during normal worktree operations.
/// Commands are spawned and immediately detached - we don't wait for them.
+///
+/// By default, shows a single-line summary of all hooks being run.
+/// With `-v`, shows verbose per-hook output with command details.
pub fn spawn_hook_commands_background(
ctx: &CommandContext,
commands: Vec<SourcedCommand>,
@@ -148,13 +159,39 @@ pub fn spawn_hook_commands_background(
return Ok(());
}
+ let verbose = verbosity();
+
+ if verbose == 0 {
+ // Single-line summary: "Running post-start hooks @ path: user:bg, project"
+ let names: Vec<String> = commands
+ .iter()
+ .map(|c| cformat!("<bold>{}</>", c.summary_name()))
+ .collect();
+ // All commands in a batch share the same display_path (set by prepare_hook_commands)
+ let display_path = commands.first().and_then(|c| c.display_path.as_ref());
+
+ let message = match display_path {
+ Some(path) => {
+ let path_display = format_path_for_display(path);
+ cformat!(
+ "Running {hook_type} hooks @ <bold>{path_display}</>: {}",
+ names.join(", ")
+ )
+ }
+ None => format!("Running {hook_type} hooks: {}", names.join(", ")),
+ };
+ crate::output::print(progress_message(message))?;
+ }
+
let operation_prefix = hook_type.to_string();
// Track index for unnamed commands to prevent log collisions
let mut unnamed_index = 0usize;
- for cmd in commands {
- cmd.announce()?;
+ for cmd in &commands {
+ if verbose >= 1 {
+ cmd.announce()?;
+ }
let name = match &cmd.prepared.name {
Some(n) => n.clone(),
diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_start_commands.rs
index 58cfc63c9..5e02ea4a4 100644
--- a/tests/integration_tests/post_start_commands.rs
+++ b/tests/integration_tests/post_start_commands.rs
@@ -758,6 +758,33 @@ approved-commands = ["sleep 0.1 && echo 'Background task done' > background.txt"
wait_for_file(output_file.as_path());
}
+/// Test that -v shows verbose per-hook output for background hooks
+#[rstest]
+fn test_post_start_verbose_shows_per_hook_output(repo: TestRepo) {
+ // Create project config with a background command
+ repo.write_project_config(
+ r#"[post-start]
+setup = "echo 'verbose test' > verbose.txt"
+"#,
+ );
+
+ repo.commit("Add background command");
+
+ // Pre-approve the command
+ repo.write_test_config(
+ r#"[projects."../origin"]
+approved-commands = ["echo 'verbose test' > verbose.txt"]
+"#,
+ );
+
+ // With -v, should show detailed per-hook output with command in gutter
+ snapshot_switch(
+ "post_start_verbose_output",
+ &repo,
+ &["-v", "--create", "feature"],
+ );
+}
+
#[rstest]
fn test_post_start_multiple_background_commands(repo: TestRepo) {
// Create project config with multiple background commands (table format)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 1de93eb6f..7ccd7b464 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -9,6 +9,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -40,7 +41,7 @@ Usage: wt config create [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
User config
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index cbcfcb877..c8f6e05ae 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -44,7 +45,7 @@ Usage: wt config [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Examples
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
index de2acc8df..cfbf63193 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -9,6 +9,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -37,4 +38,4 @@ Usage: wt config shell [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
index df02b7687..25d3ed978 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -36,4 +37,4 @@ Usage: wt config [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
index d640b4382..7d7da6f0d 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -9,6 +9,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -40,7 +41,7 @@ Usage: wt config show [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Shows location and contents of user config (~/.config/worktrunk/config.toml)
and project config (.config/wt.toml).
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state.snap b/tests/snapshots/integration__integration_tests__help__help_config_state.snap
index f23f502d3..c6de432e5 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state.snap
@@ -9,6 +9,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -47,7 +48,7 @@ Usage: wt config state [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
State is stored in .git/ (config entries and log files), separate from configuration files.
Use wt config show to view file-based configuration.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
index 535c2b95c..04b076726 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -42,7 +43,7 @@ Usage: wt config state ci-status [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Caches GitHub/GitLab CI status for display in wt list.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
index 62dc63d8f..19267f469 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -38,7 +39,7 @@ Usage: wt config state clear [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Clears all stored state:
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
index f41b08023..a93701597 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -43,7 +44,7 @@ Usage: wt config state default-branch [OPTIONS] [COMM
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Useful in scripts to avoid hardcoding main or master:
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
index 8c390153d..fb429ea65 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -43,7 +44,7 @@ Usage: wt config state get [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Shows all stored state including:
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
index 386fef7f3..d1e59892c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -42,7 +43,7 @@ Usage: wt config state logs [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
View and manage logs from background operations.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
index 203064b35..c396a42a3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -43,7 +44,7 @@ Usage: wt config state marker [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Custom status text or emoji shown in the wt list Status column.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
index 72d01b342..375316dec 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -43,7 +44,7 @@ Usage: wt config state previous-branch [OPTIONS] [COM
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Enables wt switch - to return to the previous worktree, similar to cd - or git checkout -.
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
index dd15d18e2..d0bf1f998 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
@@ -9,6 +9,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -41,7 +42,7 @@ Usage: wt hook approvals [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Project hooks require approval on first run to prevent untrusted projects from running arbitrary commands.
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
index e5ba4b93e..1e699b247 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -41,7 +42,7 @@ Usage: wt hook approvals add [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Prompts for approval of all project commands and saves them to user config.
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
index 51612b478..a467f8a06 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
@@ -10,6 +10,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -41,7 +42,7 @@ Usage: wt hook approvals clear [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Removes saved approvals, requiring re-approval on next command run.
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index 3a06b7350..6f9502f14 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -59,7 +60,7 @@ Usage: wt list [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Shows uncommitted changes, divergence from the default branch and remote, and optional CI status.
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
index 1a60ca7b4..f3a0402fe 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "80"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -60,7 +61,7 @@ Usage: wt list [OPTIONS]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Shows uncommitted changes, divergence from the default branch and remote, and
optional CI status.
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
index eb08ea08d..4a38d6d6f 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -39,4 +40,4 @@ Usage: wt list [OPTIONS]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
index 83fc8a00c..37d2cc919 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -68,7 +69,7 @@ Global Options:
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Unlike `git merge`, this merges current into target (not target into current). Similar to clicking "Merge pull request" on GitHub, but locally. Target defaults to the default branch.
diff --git a/tests/snapshots/integration__integration_tests__help__help_md_root.snap b/tests/snapshots/integration__integration_tests__help__help_md_root.snap
index 920700cb8..3b1b495bf 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_root.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_root.snap
@@ -7,6 +7,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -46,7 +47,7 @@ Global Options:
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Getting started
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
index adae671d6..e353c82e7 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -70,7 +71,7 @@ Usage: wt merge [OPTIONS] [TARGET]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Unlike git merge, this merges current into target (not target into current). Similar to clicking "Merge pull request" on GitHub, but locally. Target defaults to the default branch.
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
index 86d79ec92..4f760377c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -40,4 +41,4 @@ Usage: wt merge [OPTIONS] [TARGET]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
index 1fb066fe1..997ac6a50 100644
--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
@@ -6,6 +6,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -39,4 +40,4 @@ Usage: wt [OPTIONS] [COMMAND]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
index a5954d6a5..071b809cf 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -62,7 +63,7 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Examples
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
index c1144ce67..be061dab1 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -39,4 +40,4 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
index a76214024..fca213478 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
@@ -7,6 +7,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -48,7 +49,7 @@ Usage: wt [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Getting started
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
index 92c54004f..7b29bbece 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
@@ -7,6 +7,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -40,4 +41,4 @@ Usage: wt [OPTIONS] [COMMAND]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
index 16bba3706..41a50dde5 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -46,7 +47,7 @@ Usage: wt step [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Examples
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
index cf8ff9b01..73ad74281 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -38,4 +39,4 @@ Usage: wt step [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index d8c7b370d..c18b38940 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -83,7 +83,7 @@ Usage: wt switch [OPTIONS] <BRANCH> [--
User config file path
-v, --verbose...
- Show debug info and write diagnostic report (-vv)
+ Verbose output (-v: hooks, templates; -vv: debug report)
Worktrees are addressed by branch name; paths are computed from a configurable template. Unlike git switch, this navigates between worktrees rather than changing branches in place.
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
index 7d2cbec40..7a06ea48c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
@@ -8,6 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
+ GIT_EDITOR: ""
RUST_LOG: warn
SHELL: ""
SOURCE_DATE_EPOCH: "1735776000"
@@ -40,4 +41,4 @@ Usage: wt switch [OPTIONS] <BRANCH> [--
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Show debug info and write diagnostic report (-vv)
+ -v, --verbose... Verbose output (-v: hooks, templates; -vv: debug report)
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
index 1243e18c5..8da733586 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
@@ -41,5 +41,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project:server @ _REPO_.feature:
-  sleep 0.05 && echo 'Server running' > server.txt
+◎ Running post-start hooks @ _REPO_.feature: project:server
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap
index 87835fc6c..0268cdb9f 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap
@@ -41,7 +41,6 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'Background task' > background.txt
+◎ Running post-start hooks @ _REPO_.feature: project
◎ Executing (--execute) @ _REPO_.feature:
  echo 'Execute flag' > execute.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
index 1b584b77d..343c899af 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
@@ -39,7 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'line1
-  line2
-  line3' | grep line2 > filtered.txt
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
index f21f16b07..343c899af 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
@@ -39,5 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'POST-START-RAN' > post_start_marker.txt
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
index 51f6ca441..343c899af 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
@@ -39,5 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'unclosed quote
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
index b1f41c2a6..343c899af 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
@@ -39,5 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'stdout output' && echo 'stderr output' >&2
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
index ffa1ff440..1b378ae7f 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
@@ -38,7 +38,4 @@ exit_code: 0
✓ Created branch feature from main and worktree @ _REPO_.feature
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'first line' > multiline.txt
-  echo 'second line' >> multiline.txt
-  echo 'third line' >> multiline.txt
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
index 2d2087be5..e3eae8b86 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
@@ -39,7 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project:task1 @ _REPO_.feature:
-  echo 'Task 1 running' > task1.txt
-◎ Running post-start project:task2 @ _REPO_.feature:
-  echo 'Task 2 running' > task2.txt
+◎ Running post-start hooks @ _REPO_.feature: project:task1, project:task2
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
index b385851e0..070ef0f4d 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
@@ -39,9 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project:task1 @ _REPO_.feature:
-  echo 'TASK1_OUTPUT'
-◎ Running post-start project:task2 @ _REPO_.feature:
-  echo 'TASK2_OUTPUT'
-◎ Running post-start project:task3 @ _REPO_.feature:
-  echo 'TASK3_OUTPUT'
+◎ Running post-start hooks @ _REPO_.feature: project:task1, project:task2, project:task3
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
index 18b1a92e5..343c899af 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
@@ -39,5 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start project hook @ _REPO_.feature:
-  sleep 0.1 && echo 'Background task done' > background.txt
+◎ Running post-start hooks @ _REPO_.feature: project
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap
new file mode 100644
index 000000000..84a6ff3a9
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap
@@ -0,0 +1,48 @@
+---
+source: tests/integration_tests/post_start_commands.rs
+info:
+ program: wt
+ args:
+ - switch
+ - "-v"
+ - "--create"
+ - feature
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SHELL: ""
+ SOURCE_DATE_EPOCH: "1735776000"
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+○ Expanding worktree-path
+  ../{{ repo }}.{{ branch | sanitize }} → ../repo.feature
+✓ Created branch feature from main and worktree @ _REPO_.feature
+↳ To customize worktree locations, run wt config create
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
+○ Expanding project:setup
+  echo 'verbose test' > verbose.txt → echo 'verbose test' > verbose.txt
+◎ Running post-start project:setup @ _REPO_.feature:
+  echo 'verbose test' > verbose.txt
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap
index 7caf0cbb6..b42cbeb58 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap
@@ -5,5 +5,4 @@ expression: "&output.combined"
✓ Created branch fish-bg from main and worktree @ _REPO_.fish-bg
↳ To customize worktree locations, run wt config create
-◎ Running post-start project hook:
-  echo 'fish background task'
+◎ Running post-start hooks: project
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_post_create.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_post_create.snap
index 4c7292ef1..6e711d1d4 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_post_create.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_post_create.snap
@@ -10,5 +10,4 @@ expression: "&output.combined"
Installed 24 packages in 1.2s
✓ Created branch feature-x from main and worktree @ _REPO_.feature-x
↳ To customize worktree locations, run wt config create
-◎ Running post-start project:dev:
-  uv run dev
+◎ Running post-start hooks: project:dev
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap
index 7aefcd02d..b3c6e2bf1 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap
@@ -11,7 +11,4 @@ Installing dependencies...
Building project...
✓ Created branch feature-hooks from main and worktree @ _REPO_.feature-hooks
↳ To customize worktree locations, run wt config create
-◎ Running post-start project:server:
-  echo 'Starting dev server on port 3000'
-◎ Running post-start project:watch:
-  echo 'Watching for file changes'
+◎ Running post-start hooks: project:server, project:watch
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap
index 5df19a2a5..ad7e2e5e1 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap
@@ -5,5 +5,4 @@ expression: "&output.combined"
✓ Created branch feature-with-hooks from main and worktree @ _REPO_.feature-with-hooks
↳ To customize worktree locations, run wt config create
-◎ Running post-start project hook:
-  echo 'test command executed'
+◎ Running post-start hooks: project
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap
index c855baab3..edf35c1fa 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap
@@ -5,5 +5,4 @@ expression: "&output.combined"
✓ Created branch feature-bg from main and worktree @ _REPO_.feature-bg
↳ To customize worktree locations, run wt config create
-◎ Running post-start project hook:
-  echo 'background task'
+◎ Running post-start hooks: project
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_post_hook_no_path_with_shell_integration.snap b/tests/snapshots/integration__integration_tests__switch__switch_post_hook_no_path_with_shell_integration.snap
index d6cf7fe3b..54aa1ada1 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_post_hook_no_path_with_shell_integration.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_post_hook_no_path_with_shell_integration.snap
@@ -39,5 +39,4 @@ exit_code: 0
----- stderr -----
✓ Created branch post-hook-shell-test from main and worktree @ _REPO_.post-hook-shell-test
↳ To customize worktree locations, run wt config create
-◎ Running post-switch project hook:
-  echo switched
+◎ Running post-switch hooks: project
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_post_hook_path_annotation.snap b/tests/snapshots/integration__integration_tests__switch__switch_post_hook_path_annotation.snap
index 4cb80c304..e5ec6c2fe 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_post_hook_path_annotation.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_post_hook_path_annotation.snap
@@ -40,5 +40,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-switch project hook @ _REPO_.post-hook-test:
-  echo switched
+◎ Running post-switch hooks @ _REPO_.post-hook-test: project
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap
index 8961d09a4..2d0501620 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap
@@ -39,7 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start user:bg @ _REPO_.feature:
-  echo 'USER_POST_START' > user_bg.txt
-◎ Running post-start project hook @ _REPO_.feature:
-  echo 'PROJECT_POST_START' > project_bg.txt
+◎ Running post-start hooks @ _REPO_.feature: user:bg, project
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap
index 9d1e51140..e54e94a86 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap
@@ -39,5 +39,4 @@ exit_code: 0
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
-◎ Running post-start user:bg @ _REPO_.feature:
-  echo 'USER_POST_START_RAN' > user_bg_marker.txt
+◎ Running post-start hooks @ _REPO_.feature: user:bg