Customizable CLI theming and command syntax highlighting

Resolved 💬 4 comments Opened Jan 29, 2026 by cesuygun Closed Mar 1, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When Claude Code shows bash commands for approval, all commands look identical regardless of risk level. Destructive commands like git push --force, rm -rf, or git reset --hard appear the same as harmless commands like ls or npm test.

This makes it easy to approve dangerous commands without the visual pause that a warning color would provide. The cognitive load is entirely on me to read every command carefully, when the CLI could help by highlighting risky patterns automatically.

Proposed Solution

Add configurable syntax highlighting for dangerous command patterns in the permission prompt:

  1. Built-in danger patterns (git push, rm -rf, --force, --no-verify) displayed in red/orange
  2. User-configurable patterns via ~/.claude/settings.json, e.g.:
{                                                                                                                                                                                                                                                         
  "commandHighlighting": {                                                                                                                                                                                                                                
    "danger": ["git push", "rm -rf", "--force", "--no-verify"],                                                                                                                                                                                           
    "warning": ["git reset", "npm publish"]                                                                                                                                                                                                               
  }                                                                                                                                                                                                                                                       
}    
  1. Matching patterns in the command preview would render in the configured warning color

Alternative Solutions

I've considered using PreToolUse hooks to output warnings before dangerous commands, but hooks cannot modify the actual command display—they can only print separate text or block execution. The warning appears disconnected from the command itself.
My CLAUDE.md forbids --no-verify and similar flags, but this relies on Claude following instructions rather than providing visual feedback at approval time.

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

  1. I'm refactoring code and Claude suggests multiple git operations
  2. Claude shows for approval: git push --force origin main
  3. Currently this looks identical to git status - same white text
  4. With this feature, --force would appear in red/orange
  5. I'd immediately notice the risky flag before approving
  6. This prevents accidental force pushes that could destroy remote history

Additional Context

Similar features exist in:

  • VS Code terminal (highlights certain commands)
  • Oh My Zsh plugins (syntax highlighting in prompts)
  • iTerm2 (trigger-based highlighting)

The infrastructure partially exists—Claude Code already provides command descriptions beneath commands and has theming support. Extending this with pattern-based danger highlighting would be a natural evolution.

View original on GitHub ↗

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