Skip to content

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

docs(list): render `wt list statusline`'s help on the docs site (#3568)

Maximilian Roos11a1498fa1e0
diff --git a/docs/content/claude-code.md b/docs/content/claude-code.md
index 58bcb5e4d..a8db63356 100644
--- a/docs/content/claude-code.md
+++ b/docs/content/claude-code.md
@@ -105,13 +105,13 @@ Claude Code agents can run in isolated worktrees (`isolation: "worktree"`). By d
## Statusline (Claude Code only)
-`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. When the CI status cache is stale, this fetches from the network — typically 1–2 seconds — making it suitable for async statuslines but too slow for synchronous shell prompts. If a faster version would be helpful, please [open an issue](https://github.com/max-sixty/worktrunk/issues).
+`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. Claude Code runs it in the background, which is what makes the occasional 1–2 second CI fetch invisible.
<code>~/w/myproject.feature-auth !🤖 @<span style='color:#0a0'>+42</span> <span style='color:#a00'>-8</span> <span style='color:#0a0'>↑3</span> <span style='color:#0a0'>⇡1</span> <span style='color:#0a0'>#3035</span> Opus 🌔 65% <span style='color:#a70'>1.4×(10am–3pm)</span></code>
-The CI reference (`#3035`) links to its pull request, and a configured [dev server URL](@/list.md) shows as its port — `:3000`, dim until something answers on it. Both links are OSC 8, which Claude Code re-emits to the terminal rather than drawing itself: underlined and clickable where the terminal supports them, the same text unclickable where it doesn't.
+Worktree state comes from the same cells [`wt list`](@/list.md) renders. Claude Code's stdin JSON adds the model, the `🌔 65%` context gauge, and the rate-limit pace notice, where `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window, coloured by how much of it would be spent locked out at the cap. [`wt list statusline`](@/list.md#wt-list-statusline) documents every segment and the JSON fields behind them.
-When Claude Code provides context window usage via stdin JSON, a moon phase gauge appears (🌕→🌑 as context fills). A `<n>×(<window>)` segment appears when Claude's 5-hour or weekly rate limit is on track to be hit before reset — `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window. Its colour deepens with severity — dim, then dim-yellow, then yellow — as more of the window would be spent locked out at the cap, so a fast pace that would only tip over near the reset stays dim. Above 90% used it shows usage instead of pace — `93%(10am–3pm)` — near the cap, how much is left matters more than how fast it's going.
+The CI reference and the dev server URL are clickable links where the terminal supports them, plain text where it doesn't.
<figure class="demo">
<picture>
diff --git a/docs/content/list.md b/docs/content/list.md
index 04f36a21d..35425cbea 100644
--- a/docs/content/list.md
+++ b/docs/content/list.md
@@ -441,7 +441,7 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>wt list</span></b> <span class=c>&lt;COMMAND&gt;</span>
<b><span class=g>Commands:</span></b>
- <b><span class=c>statusline</span></b> Single-line status for shell prompts
+ <b><span class=c>statusline</span></b> Single-line status for the current worktree
<b><span class=g>Options:</span></b>
<b><span class=c>--format</span></b><span class=c> &lt;FORMAT&gt;</span>
@@ -488,4 +488,76 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
Skip approval prompts
{% end %}
+# Subcommands
+
+## wt list statusline
+
+Single-line status for the current worktree.
+
+The line carries the same cells as the worktree's row in `wt list`. A stale CI status cache makes it reach the network for a second or two, so it fits a statusline the host renders in the background — Claude Code's, a `tmux` status bar — better than a prompt the shell blocks on. Want it fast enough for a synchronous prompt? [Open an issue](https://github.com/max-sixty/worktrunk/issues).
+
+### Output formats
+
+- `table` (default): `branch status HEAD± main↕ main…± Remote⇅ CI URL`
+- `json`: A one-entry array in the `wt list --format=json` schema
+- `claude-code`: the `table` cells, preceded by `dir` and followed by `model context pace`
+
+A cell with nothing to show is left out rather than blanked, so most lines are shorter than that; `claude-code` also drops `branch` where `dir` already ends in `.<branch>`. A line that still overruns the terminal drops whole cells, least important first, starting with the dev server URL.
+
+The CI reference links to its PR/MR, and a dev server URL carrying a port shows as `:3000` linking to the URL in full, dim until something answers on that port. Both links are OSC 8, which a terminal that doesn't support them discards, leaving the same text unclickable.
+
+### Claude Code mode
+
+`--format=claude-code` reads JSON context from stdin (`.workspace.current_dir` is required; the rest are optional):
+
+- `.workspace.current_dir` — working directory
+- `.model.display_name` — model name
+- `.context_window.used_percentage` — context usage (0–100), rendered as `🌔 65%`, the moon waning 🌕→🌑 as context fills
+- `.rate_limits.{five_hour,seven_day}.used_percentage` — rate-limit window usage (0–100)
+- `.rate_limits.{five_hour,seven_day}.resets_at` — window reset time (Unix epoch seconds)
+
+The pace segment appears only when usage is likely to hit a rate limit before its window resets, and shows the higher-risk window: `2.9×(Tue–Tue 5pm)` reads as 2.9× the pace that would exactly fill that window. Above 90% used it shows usage instead of pace — `93%(Tue–Tue 5pm)` — near the cap, how much is left matters more than how fast it's going. "Likely" is a Bayesian forecast; early-window bursts don't trigger it. Its colour deepens with severity — dim, then dim-yellow, then yellow — as the forecast lockout (how much of the window would be spent capped) grows, so a fast pace that would only tip over near the reset stays dim rather than alarming. With `-vv`, each window's inputs and projection are logged to `.git/wt/logs/trace.log`.
+
+[Claude Code statusline setup](@/claude-code.md#statusline-claude-code-only) has the `~/.claude/settings.json` entry that feeds this mode.
+
+### Command reference
+
+{% terminal() %}
+wt list statusline - Single-line status for the current worktree
+
+Usage: <b><span class=c>wt list statusline</span></b> <span class=c>[OPTIONS]</span>
+
+<b><span class=g>Options:</span></b>
+ <b><span class=c>--format</span></b><span class=c> &lt;FORMAT&gt;</span>
+ Output format
+
+ Possible values:
+ - <b><span class=c>table</span></b>
+ - <b><span class=c>json</span></b>
+ - <b><span class=c>claude-code</span></b>: Claude Code statusline mode (reads context from stdin)
+
+ [default: table]
+
+ <b><span class=c>-h</span></b>, <b><span class=c>--help</span></b>
+ Print help (see a summary with &#39;-h&#39;)
+
+<b><span class=g>Global Options:</span></b>
+ <b><span class=c>-C</span></b><span class=c> &lt;path&gt;</span>
+ Working directory for this command
+
+ <b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
+ User config file path
+
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
+ <b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
+ Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
+ logs and raw subprocess output written to .git/wt/logs/). Set WORKTRUNK_VERBOSE=0|1|2 to
+ apply the same level everywhere — including shell completion, which no flag can reach
+
+ <b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
+ Skip approval prompts
+{% end %}
+
<!-- END AUTO-GENERATED -->
diff --git a/plugins/worktrunk/skills/worktrunk/reference/claude-code.md b/plugins/worktrunk/skills/worktrunk/reference/claude-code.md
index e840e8ced..d2444d17b 100644
--- a/plugins/worktrunk/skills/worktrunk/reference/claude-code.md
+++ b/plugins/worktrunk/skills/worktrunk/reference/claude-code.md
@@ -107,13 +107,13 @@ Claude Code agents can run in isolated worktrees (`isolation: "worktree"`). By d
## Statusline (Claude Code only)
-`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. When the CI status cache is stale, this fetches from the network — typically 1–2 seconds — making it suitable for async statuslines but too slow for synchronous shell prompts. If a faster version would be helpful, please [open an issue](https://github.com/max-sixty/worktrunk/issues).
+`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. Claude Code runs it in the background, which is what makes the occasional 1–2 second CI fetch invisible.
<code>~/w/myproject.feature-auth !🤖 @<span style='color:#0a0'>+42</span> <span style='color:#a00'>-8</span> <span style='color:#0a0'>↑3</span> <span style='color:#0a0'>⇡1</span> <span style='color:#0a0'>#3035</span> Opus 🌔 65% <span style='color:#a70'>1.4×(10am–3pm)</span></code>
-The CI reference (`#3035`) links to its pull request, and a configured [dev server URL](https://worktrunk.dev/list/) shows as its port — `:3000`, dim until something answers on it. Both links are OSC 8, which Claude Code re-emits to the terminal rather than drawing itself: underlined and clickable where the terminal supports them, the same text unclickable where it doesn't.
+Worktree state comes from the same cells [`wt list`](https://worktrunk.dev/list/) renders. Claude Code's stdin JSON adds the model, the `🌔 65%` context gauge, and the rate-limit pace notice, where `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window, coloured by how much of it would be spent locked out at the cap. [`wt list statusline`](https://worktrunk.dev/list/#wt-list-statusline) documents every segment and the JSON fields behind them.
-When Claude Code provides context window usage via stdin JSON, a moon phase gauge appears (🌕→🌑 as context fills). A `<n>×(<window>)` segment appears when Claude's 5-hour or weekly rate limit is on track to be hit before reset — `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window. Its colour deepens with severity — dim, then dim-yellow, then yellow — as more of the window would be spent locked out at the cap, so a fast pace that would only tip over near the reset stays dim. Above 90% used it shows usage instead of pace — `93%(10am–3pm)` — near the cap, how much is left matters more than how fast it's going.
+The CI reference and the dev server URL are clickable links where the terminal supports them, plain text where it doesn't.
Add to `~/.claude/settings.json`:
diff --git a/plugins/worktrunk/skills/worktrunk/reference/list.md b/plugins/worktrunk/skills/worktrunk/reference/list.md
index 5145e9797..5f0594fdf 100644
--- a/plugins/worktrunk/skills/worktrunk/reference/list.md
+++ b/plugins/worktrunk/skills/worktrunk/reference/list.md
@@ -458,7 +458,7 @@ Usage: wt list [OPTIONS]
wt list <COMMAND>
Commands:
- statusline Single-line status for shell prompts
+ statusline Single-line status for the current worktree
Options:
--format <FORMAT>
@@ -504,3 +504,75 @@ Global Options:
-y, --yes
Skip approval prompts
```
+
+# Subcommands
+
+## wt list statusline
+
+Single-line status for the current worktree.
+
+The line carries the same cells as the worktree's row in `wt list`. A stale CI status cache makes it reach the network for a second or two, so it fits a statusline the host renders in the background — Claude Code's, a `tmux` status bar — better than a prompt the shell blocks on. Want it fast enough for a synchronous prompt? Open an issue at https://github.com/max-sixty/worktrunk.
+
+### Output formats
+
+- `table` (default): `branch status HEAD± main↕ main…± Remote⇅ CI URL`
+- `json`: A one-entry array in the `wt list --format=json` schema
+- `claude-code`: the `table` cells, preceded by `dir` and followed by `model context pace`
+
+A cell with nothing to show is left out rather than blanked, so most lines are shorter than that; `claude-code` also drops `branch` where `dir` already ends in `.<branch>`. A line that still overruns the terminal drops whole cells, least important first, starting with the dev server URL.
+
+The CI reference links to its PR/MR, and a dev server URL carrying a port shows as `:3000` linking to the URL in full, dim until something answers on that port. Both links are OSC 8, which a terminal that doesn't support them discards, leaving the same text unclickable.
+
+### Claude Code mode
+
+`--format=claude-code` reads JSON context from stdin (`.workspace.current_dir` is required; the rest are optional):
+
+- `.workspace.current_dir` — working directory
+- `.model.display_name` — model name
+- `.context_window.used_percentage` — context usage (0–100), rendered as `🌔 65%`, the moon waning 🌕→🌑 as context fills
+- `.rate_limits.{five_hour,seven_day}.used_percentage` — rate-limit window usage (0–100)
+- `.rate_limits.{five_hour,seven_day}.resets_at` — window reset time (Unix epoch seconds)
+
+The pace segment appears only when usage is likely to hit a rate limit before its window resets, and shows the higher-risk window: `2.9×(Tue–Tue 5pm)` reads as 2.9× the pace that would exactly fill that window. Above 90% used it shows usage instead of pace — `93%(Tue–Tue 5pm)` — near the cap, how much is left matters more than how fast it's going. "Likely" is a Bayesian forecast; early-window bursts don't trigger it. Its colour deepens with severity — dim, then dim-yellow, then yellow — as the forecast lockout (how much of the window would be spent capped) grows, so a fast pace that would only tip over near the reset stays dim rather than alarming. With `-vv`, each window's inputs and projection are logged to `.git/wt/logs/trace.log`.
+
+[Claude Code statusline setup](https://worktrunk.dev/claude-code/#statusline-claude-code-only) has the `~/.claude/settings.json` entry that feeds this mode.
+
+### Command reference
+
+```
+wt list statusline - Single-line status for the current worktree
+
+Usage: wt list statusline [OPTIONS]
+
+Options:
+ --format <FORMAT>
+ Output format
+
+ Possible values:
+ - table
+ - json
+ - claude-code: Claude Code statusline mode (reads context from stdin)
+
+ [default: table]
+
+ -h, --help
+ Print help (see a summary with '-h')
+
+Global Options:
+ -C <path>
+ Working directory for this command
+
+ --config <path>
+ User config file path
+
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
+ -v, --verbose...
+ Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
+ logs and raw subprocess output written to .git/wt/logs/). Set WORKTRUNK_VERBOSE=0|1|2 to
+ apply the same level everywhere — including shell completion, which no flag can reach
+
+ -y, --yes
+ Skip approval prompts
+```
diff --git a/skills/worktrunk/reference/claude-code.md b/skills/worktrunk/reference/claude-code.md
index e840e8ced..d2444d17b 100644
--- a/skills/worktrunk/reference/claude-code.md
+++ b/skills/worktrunk/reference/claude-code.md
@@ -107,13 +107,13 @@ Claude Code agents can run in isolated worktrees (`isolation: "worktree"`). By d
## Statusline (Claude Code only)
-`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. When the CI status cache is stale, this fetches from the network — typically 1–2 seconds — making it suitable for async statuslines but too slow for synchronous shell prompts. If a faster version would be helpful, please [open an issue](https://github.com/max-sixty/worktrunk/issues).
+`wt list statusline --format=claude-code` outputs a single-line status for the Claude Code statusline. Claude Code runs it in the background, which is what makes the occasional 1–2 second CI fetch invisible.
<code>~/w/myproject.feature-auth !🤖 @<span style='color:#0a0'>+42</span> <span style='color:#a00'>-8</span> <span style='color:#0a0'>↑3</span> <span style='color:#0a0'>⇡1</span> <span style='color:#0a0'>#3035</span> Opus 🌔 65% <span style='color:#a70'>1.4×(10am–3pm)</span></code>
-The CI reference (`#3035`) links to its pull request, and a configured [dev server URL](https://worktrunk.dev/list/) shows as its port — `:3000`, dim until something answers on it. Both links are OSC 8, which Claude Code re-emits to the terminal rather than drawing itself: underlined and clickable where the terminal supports them, the same text unclickable where it doesn't.
+Worktree state comes from the same cells [`wt list`](https://worktrunk.dev/list/) renders. Claude Code's stdin JSON adds the model, the `🌔 65%` context gauge, and the rate-limit pace notice, where `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window, coloured by how much of it would be spent locked out at the cap. [`wt list statusline`](https://worktrunk.dev/list/#wt-list-statusline) documents every segment and the JSON fields behind them.
-When Claude Code provides context window usage via stdin JSON, a moon phase gauge appears (🌕→🌑 as context fills). A `<n>×(<window>)` segment appears when Claude's 5-hour or weekly rate limit is on track to be hit before reset — `1.4×(10am–3pm)` reads as 1.4× the pace that would exactly fill that window. Its colour deepens with severity — dim, then dim-yellow, then yellow — as more of the window would be spent locked out at the cap, so a fast pace that would only tip over near the reset stays dim. Above 90% used it shows usage instead of pace — `93%(10am–3pm)` — near the cap, how much is left matters more than how fast it's going.
+The CI reference and the dev server URL are clickable links where the terminal supports them, plain text where it doesn't.
Add to `~/.claude/settings.json`:
diff --git a/skills/worktrunk/reference/list.md b/skills/worktrunk/reference/list.md
index 5145e9797..5f0594fdf 100644
--- a/skills/worktrunk/reference/list.md
+++ b/skills/worktrunk/reference/list.md
@@ -458,7 +458,7 @@ Usage: wt list [OPTIONS]
wt list <COMMAND>
Commands:
- statusline Single-line status for shell prompts
+ statusline Single-line status for the current worktree
Options:
--format <FORMAT>
@@ -504,3 +504,75 @@ Global Options:
-y, --yes
Skip approval prompts
```
+
+# Subcommands
+
+## wt list statusline
+
+Single-line status for the current worktree.
+
+The line carries the same cells as the worktree's row in `wt list`. A stale CI status cache makes it reach the network for a second or two, so it fits a statusline the host renders in the background — Claude Code's, a `tmux` status bar — better than a prompt the shell blocks on. Want it fast enough for a synchronous prompt? Open an issue at https://github.com/max-sixty/worktrunk.
+
+### Output formats
+
+- `table` (default): `branch status HEAD± main↕ main…± Remote⇅ CI URL`
+- `json`: A one-entry array in the `wt list --format=json` schema
+- `claude-code`: the `table` cells, preceded by `dir` and followed by `model context pace`
+
+A cell with nothing to show is left out rather than blanked, so most lines are shorter than that; `claude-code` also drops `branch` where `dir` already ends in `.<branch>`. A line that still overruns the terminal drops whole cells, least important first, starting with the dev server URL.
+
+The CI reference links to its PR/MR, and a dev server URL carrying a port shows as `:3000` linking to the URL in full, dim until something answers on that port. Both links are OSC 8, which a terminal that doesn't support them discards, leaving the same text unclickable.
+
+### Claude Code mode
+
+`--format=claude-code` reads JSON context from stdin (`.workspace.current_dir` is required; the rest are optional):
+
+- `.workspace.current_dir` — working directory
+- `.model.display_name` — model name
+- `.context_window.used_percentage` — context usage (0–100), rendered as `🌔 65%`, the moon waning 🌕→🌑 as context fills
+- `.rate_limits.{five_hour,seven_day}.used_percentage` — rate-limit window usage (0–100)
+- `.rate_limits.{five_hour,seven_day}.resets_at` — window reset time (Unix epoch seconds)
+
+The pace segment appears only when usage is likely to hit a rate limit before its window resets, and shows the higher-risk window: `2.9×(Tue–Tue 5pm)` reads as 2.9× the pace that would exactly fill that window. Above 90% used it shows usage instead of pace — `93%(Tue–Tue 5pm)` — near the cap, how much is left matters more than how fast it's going. "Likely" is a Bayesian forecast; early-window bursts don't trigger it. Its colour deepens with severity — dim, then dim-yellow, then yellow — as the forecast lockout (how much of the window would be spent capped) grows, so a fast pace that would only tip over near the reset stays dim rather than alarming. With `-vv`, each window's inputs and projection are logged to `.git/wt/logs/trace.log`.
+
+[Claude Code statusline setup](https://worktrunk.dev/claude-code/#statusline-claude-code-only) has the `~/.claude/settings.json` entry that feeds this mode.
+
+### Command reference
+
+```
+wt list statusline - Single-line status for the current worktree
+
+Usage: wt list statusline [OPTIONS]
+
+Options:
+ --format <FORMAT>
+ Output format
+
+ Possible values:
+ - table
+ - json
+ - claude-code: Claude Code statusline mode (reads context from stdin)
+
+ [default: table]
+
+ -h, --help
+ Print help (see a summary with '-h')
+
+Global Options:
+ -C <path>
+ Working directory for this command
+
+ --config <path>
+ User config file path
+
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
+ -v, --verbose...
+ Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
+ logs and raw subprocess output written to .git/wt/logs/). Set WORKTRUNK_VERBOSE=0|1|2 to
+ apply the same level everywhere — including shell completion, which no flag can reach
+
+ -y, --yes
+ Skip approval prompts
+```
diff --git a/src/cli/list.rs b/src/cli/list.rs
index 02a61bb21..5eb05958f 100644
--- a/src/cli/list.rs
+++ b/src/cli/list.rs
@@ -5,14 +5,19 @@ use super::StatuslineFormat;
/// Subcommands for `wt list`
#[derive(Subcommand)]
pub enum ListSubcommand {
- /// Single-line status for shell prompts
- #[command(after_long_help = r#"## Output formats
+ /// Single-line status for the current worktree
+ #[command(
+ after_long_help = r#"The line carries the same cells as the worktree's row in `wt list`. A stale CI status cache makes it reach the network for a second or two, so it fits a statusline the host renders in the background — Claude Code's, a `tmux` status bar — better than a prompt the shell blocks on. Want it fast enough for a synchronous prompt? Open an issue at https://github.com/max-sixty/worktrunk.
-- `table` (default): `branch status ±working commits upstream ci url`
-- `json`: Same structure as `wt list --format=json` but for the current worktree only
-- `claude-code`: `dir branch status ±working commits upstream ci url model context pace`
+## Output formats
-The CI reference links to its PR/MR, and a dev server URL carrying a port shows as `:3000` linking to the URL in full, dim until something answers on that port — the same cells `wt list` renders. Both links are OSC 8, which a terminal that doesn't support them discards, leaving the same text unclickable.
+- `table` (default): `branch status HEAD± main↕ main…± Remote⇅ CI URL`
+- `json`: A one-entry array in the `wt list --format=json` schema
+- `claude-code`: the `table` cells, preceded by `dir` and followed by `model context pace`
+
+A cell with nothing to show is left out rather than blanked, so most lines are shorter than that; `claude-code` also drops `branch` where `dir` already ends in `.<branch>`. A line that still overruns the terminal drops whole cells, least important first, starting with the dev server URL.
+
+The CI reference links to its PR/MR, and a dev server URL carrying a port shows as `:3000` linking to the URL in full, dim until something answers on that port. Both links are OSC 8, which a terminal that doesn't support them discards, leaving the same text unclickable.
## Claude Code mode
@@ -20,12 +25,15 @@ The CI reference links to its PR/MR, and a dev server URL carrying a port shows
- `.workspace.current_dir` — working directory
- `.model.display_name` — model name
-- `.context_window.used_percentage` — context usage (0–100)
+- `.context_window.used_percentage` — context usage (0–100), rendered as `🌔 65%`, the moon waning 🌕→🌑 as context fills
- `.rate_limits.{five_hour,seven_day}.used_percentage` — rate-limit window usage (0–100)
- `.rate_limits.{five_hour,seven_day}.resets_at` — window reset time (Unix epoch seconds)
The pace segment appears only when usage is likely to hit a rate limit before its window resets, and shows the higher-risk window: `2.9×(Tue–Tue 5pm)` reads as 2.9× the pace that would exactly fill that window. Above 90% used it shows usage instead of pace — `93%(Tue–Tue 5pm)` — near the cap, how much is left matters more than how fast it's going. "Likely" is a Bayesian forecast; early-window bursts don't trigger it. Its colour deepens with severity — dim, then dim-yellow, then yellow — as the forecast lockout (how much of the window would be spent capped) grows, so a fast pace that would only tip over near the reset stays dim rather than alarming. With `-vv`, each window's inputs and projection are logged to `.git/wt/logs/trace.log`.
-"#)]
+
+[Claude Code statusline setup](@/claude-code.md#statusline-claude-code-only) has the `~/.claude/settings.json` entry that feeds this mode.
+"#
+ )]
Statusline {
/// Output format
#[arg(long, value_enum, default_value = "table")]
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 34c49821a..07aa99a39 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1208,7 +1208,7 @@ Missing a field that would be generally useful? Open an issue at https://github.
## See also
- [`wt switch`](@/switch.md) — Switch worktrees or open interactive picker
-"#
+<!-- subdoc: statusline -->"#
)]
// TODO: `args_conflicts_with_subcommands` causes confusing errors for unknown
// subcommands ("cannot be used with --branches") instead of "unknown subcommand".
diff --git a/src/commands/statusline.rs b/src/commands/statusline.rs
index 44d8e7391..ba775bb7f 100644
--- a/src/commands/statusline.rs
+++ b/src/commands/statusline.rs
@@ -1,7 +1,8 @@
-//! Statusline output for shell prompts and editors.
+//! Statusline output for hosts that render in the background (Claude Code's
+//! statusline, a `tmux` status bar).
//!
//! Outputs a single-line status for the current worktree:
-//! `branch status ±working commits upstream [ci] [url]`
+//! `branch status HEAD± main↕ main…± Remote⇅ CI URL`
//!
//! This command reuses the data collection infrastructure from `wt list`,
//! avoiding duplication of git operations.
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 beeb1fd48..4583df265 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -39,7 +39,7 @@ Usage: wt list [OPTIONS]
wt list <COMMAND>
Commands:
- statusline Single-line status for shell prompts
+ statusline Single-line status for the current worktree
Options:
--format <FORMAT>
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 f16812cb8..3732de997 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
@@ -39,7 +39,7 @@ Usage: wt list [OPTIONS]
wt list <COMMAND>
Commands:
- statusline Single-line status for shell prompts
+ statusline Single-line status for the current worktree
Options:
--format <FORMAT>
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 723c6cfb5..7d7d6f61c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -24,6 +24,7 @@ info:
WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_PARENT_SHELL: ""
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
@@ -38,7 +39,7 @@ Usage: wt list [OPTIONS]
wt list <COMMAND>
Commands:
- statusline Single-line status for shell prompts
+ statusline Single-line status for the current worktree
Options:
--format <FORMAT> Output format [default: table] [possible values: table, json]