Skip to content

Add colored severity badges to terminal scan output #255

Description

@KryptosAI

Summary

Add colored severity badges (PASS/FAIL/WARN) to terminal scan output, replacing or supplementing the current plain-text status indicators.

Files to modify

  • src/reporters/terminal.ts

What to change

  1. Import chalk (already a project dependency) for colored output.
  2. In the terminal reporter's result rendering, wrap severity labels in colored badges:
    • PASS → green background badge: chalk.bgGreen.black(' PASS ')
    • FAIL → red background badge: chalk.bgRed.white(' FAIL ')
    • WARN → yellow background badge: chalk.bgYellow.black(' WARN ')
  3. Apply the same styling to the per-check result lines and the overall score line.
  4. Ensure badges are still legible when --accessible is set (fall back to text-only labels as in Replace Unicode symbols with [PASS]/[FAIL]/[WARN] text labels in terminal reporter when --accessible is set #233).

Expected behavior

Terminal output after mcp-observatory test shows green PASS, red FAIL, and yellow WARN badges for each check result.

Estimated time

~15 minutes

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI UX, command surface, and error messagingarea:reportingTerminal, JSON, and Markdown reporting surfacesgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions