Command reference ยท Claude Code
/statusline
Configures Claude Code's status line.
/statusline configures Claude Code's customizable status line through a natural-language description. You describe what should be displayed - such as the model name, current Git branch, context usage as a progress bar, or session cost - and Claude Code automatically generates a script under ~/.claude/ along with the corresponding entry in the settings. Without an argument, the command derives a configuration automatically from the existing shell prompt.
The status line can span multiple lines and, besides text, can also display colors, clickable links, and dynamic values such as context percentage, session duration, or rate-limit usage. The underlying script can be written in any language (Bash, Python, JavaScript, and on Windows also PowerShell) and is re-run on every update.
To remove it, simply run the command again with an appropriate instruction, e.g. /statusline delete, or manually delete the statusLine field in the settings.
โ WHEN TO USE IT?
Display custom info in the status line
/statusline show me the current git branch and session cost to configure the status line accordingly
Automatically derive the status line from the existing shell prompt
run /statusline without an argument so the configuration is derived automatically from the existing prompt
โ WHEN NOT TO?
Just changing the color of the prompt bar
/statusline configures the content and layout of the status line, not the color of the input line
Better: use /color to just set the color
Rolling out the same status line centrally across many machines
/statusline interactively generates the script in the local ~/.claude/ directory and registers it in the personal settings
Better: manually copy the generated script into a project or team repository and reference it there in settings.json
SOURCES
- Claude Code docs (official) โ code.claude.com
MORE COMMANDS ยท Claude Code