Add --color CLI flag for session color (enable hook/alias automation)
Resolved 💬 5 comments Opened Apr 7, 2026 by Magnus-Gille Closed May 22, 2026
Problem
/color lets you set the session prompt bar color interactively, but there's no way to automate it:
- No
--colorCLI flag (like-n/--nameexists for naming) - No
sessionColorsetting insettings.json SessionStarthooks can't execute slash commands
This means session coloring can't be scripted via shell aliases or hooks.
Proposal
Add a --color <color> CLI flag, analogous to -n <name>:
claude --color blue
claude -n my-project --color green
Available colors: red, blue, green, yellow, purple, orange, pink, cyan, default.
Use case
Auto-rotating session colors via a shell wrapper so concurrent sessions are visually distinct:
claude() {
local color
color=$(~/.claude/hooks/next-color.sh) # reads/rotates state file
command claude -n "$(basename "$PWD")" --color "$color" "$@"
}
This pairs naturally with -n for fully automated session identification — name gives semantic context, color gives visual differentiation.
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗