NO_COLOR
Disables ANSI color codes in terminal output.When set to any non-empty value (commonly
1), this variable instructs the CLI to output plain text without color formatting. This follows the NO_COLOR standard.Default: Not set (colors enabled)Type: String (any non-empty value)TERM
Controls terminal capabilities. When set to
dumb, ANSI color codes are disabled.The CLI automatically detects TERM=dumb and disables color output to ensure compatibility with simple terminals that don’t support ANSI escape sequences.Default: Depends on your terminal (typically xterm-256color, screen, etc.)Type: StringWhen to Disable Colors
CI/CD Pipelines
Color codes can clutter logs in continuous integration environments:Log Files
When redirecting output to log files, color codes appear as escape sequences:Terminals Without Color Support
Some terminals or terminal emulators don’t support ANSI colors. The CLI automatically detectsTERM=dumb, but you can also use NO_COLOR:
Accessibility
Users who prefer plain text output for screen readers or other accessibility tools:Usage Examples
Temporary Disable
Disable colors for a single command:Session-Wide Disable
Disable colors for the current terminal session:Permanent Disable
Add to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
CI/CD Configuration
GitHub Actions:Output Comparison
With Colors (Default)
Terminal output includes ANSI escape codes for colors:Without Colors (NO_COLOR=1)
Plain text output without escape codes:Notes
- Color variables only affect human-readable output mode
- JSON output modes (
-jsonand-pretty) automatically disable colors regardless of these settings - Setting
NO_COLORto an empty string does not disable colors; it must have a value (e.g.,NO_COLOR=1) - The
NO_COLORstandard is documented at no-color.org TERM=dumbis automatically detected and disables colors without requiringNO_COLOR