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 --color CLI flag (like -n/--name exists for naming)
  • No sessionColor setting in settings.json
  • SessionStart hooks 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗