ansis
4.5.0 · 1 Nov 2026ISC56.7M / weekRepositoryHomepagenpmAtom feed
Your version
4.5.0 is the newest release of 4.x.
In short
4 internal
Release note
Bug fixes
1. TERM=dumb now disables colors during auto-detection
Ansis now treats TERM=dumb as no color before applying COLORTERM, CI detection, PM2, Next.js runtime detection, and platform-specific defaults, #49.
Before, COLORTERM=truecolor or other later auto-detection checks could still enable colors even when the environment reported TERM=dumb. This could produce visible ANSI escape codes in environments such as Emacs M-x compile.
COLORTERM remains a color capability hint. FORCE_COLOR keeps the highest priority and can still explicitly enable colors.
| Use case | v4.3.1 | v4.4.0 | Notes |
|---|---|---|---|
TERM=dumb | ✅ may allow colors * | ❌ no color | TERM=dumb now has higher priority in autoDetectLevel. |
TERM=dumb + COLORTERM=truecolor | ✅ allow colors | ❌ no color | COLORTERM no longer overrides TERM=dumb. |
TERM=dumb + CI | ✅ allow colors | ❌ no color | CI detection runs after TERM=dumb. |
TERM=dumb + PM2 | ✅ may allow colors * | ❌ no color | PM2 detection runs after TERM=dumb. |
TERM=dumb + Next.js runtime | ✅ may allow colors * | ❌ no color | Next.js detection runs after TERM=dumb. |
COLORTERM without TERM=dumb | ✅ allow colors | ✅ allow colors | Unchanged. |
CI without TERM=dumb | ✅ allow colors | ✅ allow colors | Unchanged. |
PM2 without TERM=dumb | ✅ allow colors | ✅ allow colors | Unchanged. |
Next.js without TERM=dumb | ✅ allow colors | ✅ allow colors | Unchanged. |
* - Depends on additional conditions.