chalk
v5.4.1MITTree-shakeableTS ReadyTerminal string styling done right. Expressive and readable ANSI color highlighting.
96/ 100
Excellent Health
Weekly Downloads
95.0M
Bundle Size (gzip)
5.2 kB(14.8 kB min)
Dependencies
Zero Deps
Last Updated
2024-12-01
SPONSORED CLOUD & DEV TOOLSβ’Google Ads Partner
NPMBot AI Assessment
The classic terminal styling champion, now pure ESM.
Chalk is the standard for beautiful CLI terminal output with chainable styling (`chalk.bold.red()`). Modern CLI tools looking for zero-overhead startup often migrate to picocolors, which is 14x faster and 8x smaller.
Key Advantages
- β’Beautiful, human-friendly chained API
- β’TrueColor (24-bit) support and automatic terminal color detection
- β’Zero dependencies in v5
Gotchas & Limitations
- β’Pure ESM in v5: cannot be used with require() in CommonJS without workarounds
- β’Larger footprint than minimal colorizers like picocolors
Recommended For:
CLI applications, build scripts, and developer tools
Avoid If:
Performance-critical CLI bundlers where millisecond startup time matters
FEATURED PARTNERβ’Google Ads Partner
Installation & Quickstart
Package Manager Command
javascriptnpm install chalkchalk Usage Example
javascriptimport chalk from 'chalk';
console.log(chalk.blue.bold('Hello ') + chalk.green.underline('World!'));Compare chalk with Alternatives
Recommended Alternatives
SPONSORED SERVERSβ’Google Ads Partner