Skip to content

Configurable colors and thresholds via TOKENLINE_* env vars #4

Description

@ropdias

Context

Colors and the gradient thresholds (cache HOT/COLD steps, context 50%/80% bands,
rate-limit 25/50/75/90 bands, saving-% bands) are currently hardcoded. Users with
different terminal themes or risk tolerances can't tune them without editing the
script.

Proposal

  • Allow overrides via environment variables read at the top of the script, each
    defaulting to the current hardcoded value, e.g.:
    • TOKENLINE_COLOR_HOT, TOKENLINE_COLOR_COLD, …
    • TOKENLINE_CTX_WARN_PCT (default 50), TOKENLINE_CTX_CRIT_PCT (default 80)
  • Keep zero-config behavior identical — env vars are purely additive.
  • Document the full list in the README under a "Customization" section.

Acceptance

  • With no env vars set, output is byte-identical to today.
  • Setting an override changes only the corresponding element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions