Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green. Color support is automatically detected, but you can override it by setting the level property. You should however only do this in your own code as it applies globally to all Chalk consumers. Detect whether the terminal supports color. Used internally and handled for you, but exposed for convenience. chalkStderr contains a separate instance configured with color support detected for stderr stream instead of stdout. Override rules from supportsColor apply to this too. supportsColorStderr is exposed for convenience.

Features

  • Expressive API
  • Highly performant
  • No dependencies
  • Ability to nest styles
  • Auto-detects color support
  • 256/Truecolor color support

Project Samples

Project Activity

See All Activity >

Categories

Terminals, Design

License

MIT License

Follow Chalk

Chalk Web Site

Other Useful Business Software
Go from Data Warehouse to Data and AI platform with BigQuery Icon
Go from Data Warehouse to Data and AI platform with BigQuery

Build, train, and run ML models with simple SQL. Automate data prep, analysis, and predictions with built-in AI assistance from Gemini.

BigQuery is more than a data warehouse—it's an autonomous data-to-AI platform. Use familiar SQL to train ML models, run time-series forecasts, and generate AI-powered insights with native Gemini integration. Built-in agents handle data engineering and data science workflows automatically. Get $300 in free credit, query 1 TB, and store 10 GB free monthly.
Try BigQuery Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Chalk!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Terminals, JavaScript Design Software

Registered

2022-05-11