{"id":35711242,"url":"https://github.com/kkokotero/mauw","last_synced_at":"2026-01-13T20:29:24.152Z","repository":{"id":330732930,"uuid":"1123570608","full_name":"kkokotero/mauw","owner":"kkokotero","description":"A modern, lightweight library for handling colors, styles, and Unicode characters in the terminal.","archived":false,"fork":false,"pushed_at":"2025-12-27T15:36:42.000Z","size":117,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T11:58:37.597Z","etag":null,"topics":["ansi","ansi-colors","chalk","colorette","console","javascript","kleur","symbols","terminal","terminal-colors","text-styling","typescript","unicode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kkokotero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T06:35:48.000Z","updated_at":"2025-12-28T19:46:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kkokotero/mauw","commit_stats":null,"previous_names":["kkokotero/mauw"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kkokotero/mauw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkokotero%2Fmauw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkokotero%2Fmauw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkokotero%2Fmauw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkokotero%2Fmauw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkokotero","download_url":"https://codeload.github.com/kkokotero/mauw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkokotero%2Fmauw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","ansi-colors","chalk","colorette","console","javascript","kleur","symbols","terminal","terminal-colors","text-styling","typescript","unicode"],"created_at":"2026-01-06T04:12:12.135Z","updated_at":"2026-01-13T20:29:24.139Z","avatar_url":"https://github.com/kkokotero.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" style=\"background-color: #fff;\"\u003e\n  \u003cimg src=\"misc/banner.svg\" alt=\"mauw\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/mauw\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/v/mauw\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/mauw\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/dm/mauw\" alt=\"downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://packagephobia.now.sh/result?p=mauw\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/min/mauw\" alt=\"Bundle Size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=mauw\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/mauw\" alt=\"Bundle Size (gzip)\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA modern, lightweight library for handling colors, styles, and Unicode characters in the terminal.\u003c/strong\u003e\n\u003c/p\u003e\n\n**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.\n\nDesigned 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.\n\n## Design philosophy\n\nmauw prioritizes explicitness, composability, and performance.\nNo hidden state, no magic globals, no unnecessary abstractions.\n\n## Features\n\n- RGB, HEX, and background color support\n- Smart Unicode fallbacks for incompatible terminals\n- Fully typed API (TypeScript-first)\n- Extremely small bundle size\n- Terminal-focused, no browser bloat\n- ESM-ready\n\n## Performance\n\nmauw is designed to be fast and lightweight, with minimal startup and runtime overhead,\nmaking it suitable even for short-lived CLI commands.\n\n## Compared to other libraries\n\n- Smaller than most popular color libraries\n- Stronger typing than legacy solutions\n- No ANSI magic leaking into user code\n\n## Why mauw?\n\n- Designed for performance-critical CLI tools\n- Minimal runtime overhead\n- Strong typing without sacrificing speed\n- Predictable output across terminals\n\n## Install\n\n```bash\nnpm install mauw\n```\n\n## Usage\n\n\u003e mauw provides a simple and expressive API for styling terminal output using colors and Unicode-safe utilities.\n\nmauw is optimized for functional composition.\nProperty chaining is supported for convenience,\nbut functional composition is the recommended and fastest approach.\n\n### Basic colors\n\n```ts\nimport mauw from 'mauw/colors';\n\nconsole.log(\n  mauw.rgb(255, 0, 0)('Red text'),\n  mauw.hex('#00ff99')('Green text'),\n  mauw.blue('Blue text')\n);\n```\n\n### Background colors\n\n```ts\nimport mauw from 'mauw/colors';\n\nconsole.log(\n  mauw.bgRgb(30, 30, 30)('Dark background'),\n  mauw.bgHex('#1e1e1e')('HEX background'),\n  mauw.bgGreen(\"Green background\")\n);\n```\n\n### Composing styles\n\n```ts\nimport mauw from 'mauw/colors';\n\nconsole.log(mauw.bgRgb(200, 40, 40).bold('Highlighted text'));\nconsole.log(mauw.bgRgb(200, 40, 40)(mauw.bold('Highlighted text')));\n```\n\n### Static color definitions\n\n```ts\nimport { COLORS_ENABLED } from 'mauw/colors';\n\nif (COLORS_ENABLED) {\n  console.log('Colors are enabled in this terminal');\n}\n```\n\n\n## Unicode-safe output (auto-detect)\n\nUse this mode when you want **the best possible output** without worrying about the environment.\nThe library automatically detects Unicode support and selects the optimal character set.\n\n```ts\nimport character from 'mauw/characters';\n\nconsole.log(character.success, 'Build finished');\nconsole.log(character.warning, 'Low disk space');\nconsole.log(character.arrowRight, 'Next step');\n```\n\n✔ Recommended for most use cases\n✔ Safe for CI, SSH, and older terminals\n✔ Works with lazy loading and tree-shaking\n\n---\n\n## Forced fallback output (ASCII-only)\n\nUseful when you need **fully predictable output**, such as:\n\n* plain logs\n* `.txt` files\n* environments without Unicode support (embedded or legacy systems)\n\n```ts\nimport character from 'mauw/characters/fallback';\n\nconsole.log(character.success, 'Tests passed');\nconsole.log(character.pointerSmall, 'Running lint');\nconsole.log(character.line.repeat(20));\n```\n\n- No Unicode characters\n- Fully portable\n- Ideal for logs and serialized output\n\n## Forced Unicode output\n\nUse this mode when you **know the environment supports Unicode** and want the richest visual output.\n\n```ts\nimport character from 'mauw/characters/unicode';\n\nconsole.log(character.checkboxOn, 'Feature enabled');\nconsole.log(character.heart, 'Powered by mauw');\nconsole.log(character.boxRoundedTopLeft + character.line.repeat(8));\n```\n\n- Rich visual output\n- Perfect for modern CLIs\n- Includes symbols, spinners, and box-drawing characters\n\n---\n\n### Tip\n\nYou can mix imports depending on your needs:\n\n```ts\nimport base from 'mauw/characters/base';\nimport unicode from 'mauw/characters/unicode';\n\nconsole.log(base.dot, unicode.star, 'Release ready');\n```\n\nThis keeps your bundle small while maintaining consistent output.\n\n## Available Symbols (Unicode \u0026 ASCII Fallbacks)\n\nThis library provides a curated set of **terminal-friendly symbols**, designed to work consistently across environments.\n\nWhen Unicode is supported, richer symbols are used. Otherwise, clean **ASCII fallbacks** are applied automatically.\n\n---\n\n### Unicode Symbols (Preferred)\n\n\u003e Used when the terminal supports Unicode characters.\n\n\u003cimg src=\"misc/unicode_symbols.png\" alt=\"Unicode symbols preview\" /\u003e\n\n---\n\n### ASCII Fallback Symbols\n\n\u003e Automatically used in non-Unicode environments (CI, legacy terminals, limited fonts).\n\n\u003cimg src=\"misc/fallback_symbols.png\" alt=\"ASCII fallback symbols preview\" /\u003e\n\n---\n\n## Spinners\n\nSpinners are animated using the same fallback strategy, ensuring smooth behavior in all environments.\n\n### Unicode Spinners\n\n\u003cimg src=\"misc/unicode_symbols_spinners.gif\" alt=\"Unicode spinners preview\" /\u003e\n\n---\n\n### ASCII Fallback Spinners\n\n\u003cimg src=\"misc/fallback_symbols_spinners.gif\" alt=\"ASCII fallback spinners preview\" /\u003e\n\n---\n\n### Notes\n\n* Symbols are **data-only** (no rendering side effects)\n* Fallbacks are deterministic and predictable\n* Designed for **CLIs, logs, and interactive demos**\n* Color is applied **optionally**, not baked into symbols\n\n## Performance\n\n\u003e See the full benchmark suite in the `bench/` directory.\n\n\u003cimg src=\"./misc/performa_bench.png\" alt=\"mauw-bench-performance\" height=\"300\" /\u003e\n\nmauw is built with performance as a first-class concern.\nIts core focuses on minimizing allocations, avoiding unnecessary string operations, and favoring functional composition over heavy chaining mechanisms.\n\nIn practice, this results in:\n\n- Significantly lower execution time compared to common terminal color libraries\n- Near-zero allocations in most simple color operations\n- Extremely fast nested styling and composition\n- Minimal overhead even in short-lived CLI processes\n\n\u003e 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.\n\n### Verifying performance\n\nAll performance claims are fully reproducible.\n\nTo manually verify and compare results, you can run the benchmark suite included in the repository:\n\n```bash\nnpm install\nnode bench/load.ts\nnode bench/dryrun.ts\nnode bench/performance.ts\n```\n\n\n\u003e 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.\n\n\u003e Performance may vary depending on runtime, CPU, and OS, but relative efficiency remains consistent.\n\n## Contributors\n\nThanks to these amazing people:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\n\nMIT © Kkotero\n\n## Contributing\n\nIssues and pull requests are welcome.\n\n---\n\u003cp align=\"center\"\u003e\n  Built with ❤️ for great developer and user experiences.\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkokotero%2Fmauw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkokotero%2Fmauw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkokotero%2Fmauw/lists"}