Skip to content

Respect TTY detection and NO_COLOR in CLI output #36

Closed

Description

@LunaStev

Problem

vex --version always emits ANSI color escapes, including when stdout is redirected or NO_COLOR=1 is set. This was verified by piping the command to a byte dump on master.

Machine consumers, logs, release checks, and Windows terminals should not receive unconditional control sequences.

Expected behavior

Color should be automatic by default, disabled for non-terminals, and controllable through a documented policy.

Acceptance criteria

  • Disable color when the destination stream is not a terminal.
  • Honor the NO_COLOR convention.
  • Define a global --color auto|always|never interface if explicit override is needed.
  • Apply one policy to version output, diagnostics, and status messages.
  • Keep stdout and stderr policies independent.
  • Add tests that assert raw output bytes for redirected and explicit modes.

Activity

  1. added
    bug
    cross-platform
    ui/ux
    on Sep 18, 2026
  2. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcross-platformui/ux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions