Skip to content

Add ANSI color support detection for Windows cmd.exe compatibility #27

@that-github-user

Description

@that-github-user

Summary

src/utils/display.ts uses raw ANSI escape codes for terminal colors. This works on:

  • ✅ macOS/Linux terminals
  • ✅ Windows Terminal
  • ✅ PowerShell 7+
  • ❌ Windows cmd.exe (outputs literal escape sequences)

Proposed fix

Either:

  1. Use chalk or picocolors package (lightweight, handles detection)
  2. Check process.stdout.isTTY and FORCE_COLOR / NO_COLOR env vars
  3. At minimum, respect the NO_COLOR env var standard (https://no-color.org/)

Acceptance criteria

  • Colors work on macOS/Linux
  • Colors work on Windows Terminal / PowerShell 7
  • Colors disabled gracefully on cmd.exe or when NO_COLOR is set
  • CI output doesn't contain raw ANSI codes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions