
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
A lightweight, chainable, and functional terminal colors library for Node.js with Unicode character support and graceful fallbacks.
A modern, lightweight library for handling colors, styles, and Unicode characters in the terminal.
mauw is a library written in TypeScript focused on efficient color and style management for the terminal. It provides modern utilities for working with RGB, HEX, backgrounds, static variants, and Unicode character support, offering smart fallbacks for environments where certain symbols or colors are not available.
Designed with a focus on performance, strong typing, and minimal weight, mauw is ideal for CLIs, development tools, and terminal applications that seek consistent visual output without sacrificing speed or simplicity.
mauw prioritizes explicitness, composability, and performance. No hidden state, no magic globals, no unnecessary abstractions.
mauw is designed to be fast and lightweight, with minimal startup and runtime overhead, making it suitable even for short-lived CLI commands.
npm install mauw
mauw provides a simple and expressive API for styling terminal output using colors and Unicode-safe utilities.
mauw is optimized for functional composition. Property chaining is supported for convenience, but functional composition is the recommended and fastest approach.
import mauw from 'mauw/colors';
console.log(
mauw.rgb(255, 0, 0)('Red text'),
mauw.hex('#00ff99')('Green text'),
mauw.blue('Blue text')
);
import mauw from 'mauw/colors';
console.log(
mauw.bgRgb(30, 30, 30)('Dark background'),
mauw.bgHex('#1e1e1e')('HEX background'),
mauw.bgGreen("Green background")
);
import mauw from 'mauw/colors';
console.log(mauw.bgRgb(200, 40, 40).bold('Highlighted text'));
console.log(mauw.bgRgb(200, 40, 40)(mauw.bold('Highlighted text')));
import { COLORS_ENABLED } from 'mauw/colors';
if (COLORS_ENABLED) {
console.log('Colors are enabled in this terminal');
}
Use this mode when you want the best possible output without worrying about the environment. The library automatically detects Unicode support and selects the optimal character set.
import character from 'mauw/characters';
console.log(character.success, 'Build finished');
console.log(character.warning, 'Low disk space');
console.log(character.arrowRight, 'Next step');
✔ Recommended for most use cases ✔ Safe for CI, SSH, and older terminals ✔ Works with lazy loading and tree-shaking
Useful when you need fully predictable output, such as:
.txt filesimport character from 'mauw/characters/fallback';
console.log(character.success, 'Tests passed');
console.log(character.pointerSmall, 'Running lint');
console.log(character.line.repeat(20));
Use this mode when you know the environment supports Unicode and want the richest visual output.
import character from 'mauw/characters/unicode';
console.log(character.checkboxOn, 'Feature enabled');
console.log(character.heart, 'Powered by mauw');
console.log(character.boxRoundedTopLeft + character.line.repeat(8));
You can mix imports depending on your needs:
import base from 'mauw/characters/base';
import unicode from 'mauw/characters/unicode';
console.log(base.dot, unicode.star, 'Release ready');
This keeps your bundle small while maintaining consistent output.
This library provides a curated set of terminal-friendly symbols, designed to work consistently across environments.
When Unicode is supported, richer symbols are used. Otherwise, clean ASCII fallbacks are applied automatically.
Used when the terminal supports Unicode characters.
Automatically used in non-Unicode environments (CI, legacy terminals, limited fonts).
Spinners are animated using the same fallback strategy, ensuring smooth behavior in all environments.
See the full benchmark suite in the
bench/directory.
mauw is built with performance as a first-class concern. Its core focuses on minimizing allocations, avoiding unnecessary string operations, and favoring functional composition over heavy chaining mechanisms.
In practice, this results in:
Benchmarks show that mauw consistently outperforms popular alternatives in basic coloring, nested styles, and composition patterns, while also producing less garbage for the runtime to clean up.
All performance claims are fully reproducible.
To manually verify and compare results, you can run the benchmark suite included in the repository:
npm install
node bench/load.ts
node bench/dryrun.ts
node bench/performance.ts
This will execute real-world scenarios comparing mauw against other well-known libraries, allowing you to validate execution time, memory usage, and composition cost on your own machine.
Performance may vary depending on runtime, CPU, and OS, but relative efficiency remains consistent.
Thanks to these amazing people:
MIT © Kkotero
Issues and pull requests are welcome.
FAQs
A lightweight, chainable, and functional terminal colors library for Node.js with Unicode character support and graceful fallbacks.
The npm package mauw receives a total of 12 weekly downloads. As such, mauw popularity was classified as not popular.
We found that mauw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.