# agauniyal/rang

A Minimal, Header only Modern c++ library for terminal goodies 💄✨

Repository: https://github.com/agauniyal/rang
Canonical: https://ross.abutalabs.com/products/rang
Homepage: https://agauniyal.github.io/rang/
Language: C++
License: Unlicense
License Family: permissive
Topics: cli, ansi, rang, cpp, cpp11, console, command-line, color, terminal, cpp14, cpp17, cplusplus, cpp-library
Last push: 2026-05-16T15:36:28+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 82, release rhythm 52, longevity 100
- inputs: {"age_days": 3838, "days_push": 109, "days_rel": 109, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1593, forks 157 (observed 2026-08-28T04:05:08.904606+00:00)

## What it is
Rang is a minimal, single-header modern C++ library for styling terminal output with colors and text attributes via iostream manipulators. It handles ANSI escape codes, Windows console specifics, and tty detection automatically across Unix and Windows.

## Use cases
- colorize terminal output in a C++ program
- add ANSI colors to CLI tool output
- style console text with bold and colors in C++
- cross-platform terminal colors including Windows
- header-only C++ library for terminal styling
- avoid printing escape codes when output is redirected to a file

## When to choose
- you want zero-dependency, drop-in header-only terminal colors in C++
- your CLI must work on both Windows and Unix terminals
- you need automatic tty detection and color control modes

## When to avoid
- you need support for non-ANSI terminals or advanced terminal capabilities
- you're not using C++ or want a runtime-configurable styling framework

## Facets
- artifact type: library
- maturity: stable
- function: cli, developer-tools
- domain: developer-tools, cross-platform
- platform: cpp, windows, cross-platform
- tags: header-only, ansi-colors, terminal-styling, iostream, single-header, command-line, linux, macos

## Member repositories
- agauniyal/rang (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:08.904606+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:54:14.751176+00:00, confidence not recorded.
  - readme: https://github.com/agauniyal/rang (fetched 2026-08-28T04:05:08.904606+00:00, sha 35ad0a9e5e9a)
  - homepage: https://agauniyal.github.io/rang/ (fetched 2026-08-29T11:25:02.370721+00:00, sha e6b2e8273e21)
- Data as of 2026-08-30T08:39:29.467469+00:00.
