A terminal string styling library for Node.js with an expressive API, high performance, and no dependencies.
Chalk is a Node.js library for styling terminal strings with colors, backgrounds, and text modifiers like bold and underline. It solves the problem of creating visually distinct and readable command-line output by providing an intuitive, chainable API that works across different terminal environments with automatic color support detection.
Node.js developers building command-line interfaces (CLIs), scripts, or tools that require colored or formatted terminal output.
Developers choose Chalk for its mature, dependency-free design, expressive API, and reliable long-term maintenance. It balances performance with extensive features like truecolor support and nested styling, making it a trusted standard in the ecosystem.
🖍 Terminal string styling done right
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides an intuitive, composable interface with methods like chalk.blue.bold.underline('text'), making code readable and easy to write, as shown in the usage examples.
Keeps the library lightweight and reduces security risks, emphasized in the README's highlights and FAQ about trust and maintenance.
Intelligently detects terminal capabilities and allows overrides via environment variables like FORCE_COLOR, ensuring cross-platform compatibility.
Supports millions of colors with hex and RGB models, and allows nested styles for complex formatting, as demonstrated in the nested styles examples.
Forces a migration to ESM, which can break CommonJS projects or require using Chalk 4, as admitted in the README's install note.
Modifiers like italic and strikethrough are noted as not widely supported in terminals, limiting reliable cross-environment styling.
Has a bigger footprint compared to packages like yoctocolors, which the README acknowledges as a trade-off for its feature set.