#[non_exhaustive]pub struct StatusLine {
pub kind: Option<String>,
pub command: Option<String>,
pub padding: Option<f64>,
pub refresh_interval: Option<u64>,
pub hide_vim_mode_indicator: Option<bool>,
pub extra: Extra,
}Expand description
statusLine: a command that prints the status line from the session
JSON on its stdin.
Run your own command to render a status line
below the prompt with context such as the model, cost, or git branch. Optional fields adjust
spacing, add periodic re-runs, and hide the built-in vim mode indicator when your script
renders vim.mode itself.
Docs: statusLine.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: Option<String>The type of status line handler; must be set to “command” to run a custom shell script that receives JSON session data via stdin.
- Values: string
- Default: unset
Docs: type.
command: Option<String>A shell command or path to a script that displays session information (context usage, costs, git status, etc.) by reading JSON data from stdin and writing output to stdout.
- Values: string
- Default: unset
Docs: command.
padding: Option<f64>Optional number of extra horizontal spacing characters added to the status line content; defaults to 0.
- Values: a number
- Default: unset
Docs: padding.
refresh_interval: Option<u64>Re-run the status line command every N seconds in addition to event-driven updates. Leave unset to run only on events. Useful for time-based data like clocks, or when background subagents change git state while the main session is idle.
- Values: a whole number, minimum
1 - Default: unset
Docs: refreshInterval.
hide_vim_mode_indicator: Option<bool>Set to true when your status line script renders the vim mode indicator itself, to suppress the built-in vim mode display.
- Values: Boolean
- Default: unset
Docs: hideVimModeIndicator.
extra: ExtraKeys Claude Code accepts here that this crate doesn’t model (newer or undocumented ones), kept as written so the document round-trips.