Skip to main content
Universal Speedtest CLI respects the following environment variables:

NO_COLOR

NO_COLOR
string
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

TERM
string
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: String

When to Disable Colors

CI/CD Pipelines

Color codes can clutter logs in continuous integration environments:
NO_COLOR=1 unispeedtest

Log Files

When redirecting output to log files, color codes appear as escape sequences:
# Without NO_COLOR (produces garbled output in file)
unispeedtest > log.txt

# With NO_COLOR (clean output)
NO_COLOR=1 unispeedtest > log.txt

Terminals Without Color Support

Some terminals or terminal emulators don’t support ANSI colors. The CLI automatically detects TERM=dumb, but you can also use NO_COLOR:
# Automatic detection
TERM=dumb unispeedtest

# Or explicitly disable
export NO_COLOR=1
unispeedtest

Accessibility

Users who prefer plain text output for screen readers or other accessibility tools:
# Add to shell profile (.bashrc, .zshrc, etc.)
export NO_COLOR=1

Usage Examples

Temporary Disable

Disable colors for a single command:
NO_COLOR=1 unispeedtest

Session-Wide Disable

Disable colors for the current terminal session:
export NO_COLOR=1
unispeedtest

Permanent Disable

Add to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
echo 'export NO_COLOR=1' >> ~/.bashrc
source ~/.bashrc
unispeedtest

CI/CD Configuration

GitHub Actions:
- name: Run Speed Test
  run: unispeedtest
  env:
    NO_COLOR: 1
GitLab CI:
speedtest:
  script:
    - unispeedtest
  variables:
    NO_COLOR: "1"
Jenkins:
environment {
    NO_COLOR = '1'
}
stages {
    stage('Speed Test') {
        steps {
            sh 'unispeedtest'
        }
    }
}

Output Comparison

With Colors (Default)

Terminal output includes ANSI escape codes for colors:
$ unispeedtest
\033[1mInitializing Cloudflare Speed Test...\033[0m

\033[1m[ Download Measurements ]\033[0m
# ... colored progress output ...

Without Colors (NO_COLOR=1)

Plain text output without escape codes:
$ NO_COLOR=1 unispeedtest
Initializing Cloudflare Speed Test...

[ Download Measurements ]
# ... plain text progress output ...

Notes

  • Color variables only affect human-readable output mode
  • JSON output modes (-json and -pretty) automatically disable colors regardless of these settings
  • Setting NO_COLOR to an empty string does not disable colors; it must have a value (e.g., NO_COLOR=1)
  • The NO_COLOR standard is documented at no-color.org
  • TERM=dumb is automatically detected and disables colors without requiring NO_COLOR

Build docs developers (and LLMs) love