{"_id":"@alcyone-labs/simple-chalk","_rev":"3-7c168b4cc42407fcf49281b8a761985d","name":"@alcyone-labs/simple-chalk","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@alcyone-labs/simple-chalk","version":"1.0.0","keywords":["chalk","color","terminal","cli","ansi","bundling","drop-in","replacement","simple","lightweight"],"author":{"name":"Alcyone Labs"},"license":"MIT","_id":"@alcyone-labs/simple-chalk@1.0.0","maintainers":[{"name":"nembleton","email":"nicolas.embleton@gmail.com"}],"homepage":"https://github.com/AlcyoneLabs/simple-chalk#readme","bugs":{"url":"https://github.com/AlcyoneLabs/simple-chalk/issues"},"dist":{"shasum":"d6a9a6f4b11aa98f43d269cebf949a1b30b2df7a","tarball":"https://registry.npmjs.org/@alcyone-labs/simple-chalk/-/simple-chalk-1.0.0.tgz","fileCount":27,"integrity":"sha512-gIt+QK+GG2V/mSrIJGt895S+F56KZa9oLhbT2UP7OlFH9tOl7T8xn9D1OMk+0RmFvdaDy2jM7dLzdygjRqa1Ag==","signatures":[{"sig":"MEQCIG1KaOE0pRmsmpfAj0Ezn4x0MHWGIpMv9/H8m8LXfg9WAiA1hpKSg5CxtuWPsflX9E9yVcTUycos09VgR2TQfdjbdg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63775},"main":"dist/cjs/index.js","type":"module","_from":"file:alcyone-labs-simple-chalk-1.0.0.tgz","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./fast":{"types":"./dist/types/SimpleChalkFast.d.ts","import":"./dist/esm/SimpleChalkFast.js","require":"./dist/cjs/SimpleChalkFast.js"},"./browser":{"types":"./dist/types/SimpleChalkBrowser.d.ts","import":"./dist/esm/SimpleChalkBrowser.js","require":"./dist/cjs/SimpleChalkBrowser.js"}},"scripts":{"lint":"tsc --noEmit","test":"vitest","build":"npm run build:clean && npm run build:types && npm run build:cjs && npm run build:esm","test:run":"vitest run","validate":"npm run lint && npm run test:run","benchmark":"npm run build && node benchmark.js","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","build:clean":"rm -rf dist","build:types":"tsc --project tsconfig.types.json","publish:npm":"npm publish","test:browser":"npm run build && echo 'Open browser-test.html in your browser to test browser compatibility'","test:coverage":"vitest run --coverage","publish:dry-run":"npm publish --dry-run"},"_npmUser":{"name":"nembleton","actor":{"name":"nembleton","type":"user","email":"nicolas.embleton@gmail.com"},"email":"nicolas.embleton@gmail.com"},"_resolved":"/private/var/folders/27/xlh5p6rd54vgnqk_t2kq551c0000gn/T/79e208383fde4fc3c043aca4f10e6e41/alcyone-labs-simple-chalk-1.0.0.tgz","_integrity":"sha512-gIt+QK+GG2V/mSrIJGt895S+F56KZa9oLhbT2UP7OlFH9tOl7T8xn9D1OMk+0RmFvdaDy2jM7dLzdygjRqa1Ag==","repository":{"url":"git+https://github.com/AlcyoneLabs/simple-chalk.git","type":"git"},"_npmVersion":"10.9.2","description":"A bundling-friendly, drop-in replacement for Chalk with basic terminal coloring features","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"devDependencies":{"chalk":"^5.4.1","kleur":"^4.1.5","vitest":"^3.2.4","cli-color":"^2.0.4","colorette":"^2.0.20","nanocolors":"^0.2.13","picocolors":"^1.1.1","typescript":"^5.8.3","@types/node":"^24.0.12","ansi-colors":"^4.1.3","yoctocolors":"^2.1.1","@vitest/coverage-v8":"^3.2.4","@jonahsnider/benchmark":"^5.1.1"},"_npmOperationalInternal":{"tmp":"tmp/simple-chalk_1.0.0_1752080044959_0.43186849865447763","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alcyone-labs/simple-chalk","version":"1.0.1","keywords":["chalk","cli","color","lightweight","mcp","simple-chalk","terminal"],"author":{"name":"Alcyone Labs"},"license":"MIT","_id":"@alcyone-labs/simple-chalk@1.0.1","maintainers":[{"name":"nembleton","email":"nicolas.embleton@gmail.com"}],"homepage":"https://github.com/Alcyone-Labs/simple-chalk#readme","bugs":{"url":"https://github.com/Alcyone-Labs/simple-chalk/issues"},"dist":{"shasum":"a774eec079daec01ba8402e7f402c5ad2c40d206","tarball":"https://registry.npmjs.org/@alcyone-labs/simple-chalk/-/simple-chalk-1.0.1.tgz","fileCount":27,"integrity":"sha512-X17ZrsYd/oK5Rq0vbMv+Bv2+auHXdYxbyF7+qkhSPXPaFxzmS6tZrDB9chfufpvVsTWD+ZIzdyiV7uDV8TTDuQ==","signatures":[{"sig":"MEQCIGZyvfZ+vt6Db7tCQ1pyhHkutfieQGKixvVEzcm4fciTAiAZPSsb7RIMFSTjgh80v/JAynMQsk4kp7YnnNVEViQhtQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63733},"main":"dist/cjs/index.js","type":"module","_from":"file:alcyone-labs-simple-chalk-1.0.1.tgz","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./fast":{"types":"./dist/types/SimpleChalkFast.d.ts","import":"./dist/esm/SimpleChalkFast.js","require":"./dist/cjs/SimpleChalkFast.js"},"./browser":{"types":"./dist/types/SimpleChalkBrowser.d.ts","import":"./dist/esm/SimpleChalkBrowser.js","require":"./dist/cjs/SimpleChalkBrowser.js"}},"scripts":{"lint":"tsc --noEmit","test":"vitest","build":"npm run build:clean && npm run build:types && npm run build:cjs && npm run build:esm","test:run":"vitest run","validate":"npm run lint && npm run test:run","benchmark":"npm run build && node benchmark.js","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","build:clean":"rm -rf dist","build:types":"tsc --project tsconfig.types.json","publish:npm":"npm publish","test:browser":"npm run build && echo 'Open browser-test.html in your browser to test browser compatibility'","test:coverage":"vitest run --coverage","publish:dry-run":"npm publish --dry-run"},"_npmUser":{"name":"nembleton","email":"nicolas.embleton@gmail.com"},"_resolved":"/private/var/folders/27/xlh5p6rd54vgnqk_t2kq551c0000gn/T/3055a6f90a40f3aad9dd311ea12acdcd/alcyone-labs-simple-chalk-1.0.1.tgz","_integrity":"sha512-X17ZrsYd/oK5Rq0vbMv+Bv2+auHXdYxbyF7+qkhSPXPaFxzmS6tZrDB9chfufpvVsTWD+ZIzdyiV7uDV8TTDuQ==","repository":{"url":"git+https://github.com/Alcyone-Labs/simple-chalk.git","type":"git"},"_npmVersion":"10.9.2","description":"A bundling-friendly, drop-in replacement for Chalk with basic terminal coloring features","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"devDependencies":{"chalk":"^5.4.1","kleur":"^4.1.5","vitest":"^3.2.4","cli-color":"^2.0.4","colorette":"^2.0.20","nanocolors":"^0.2.13","picocolors":"^1.1.1","typescript":"^5.8.3","@types/node":"^24.0.12","ansi-colors":"^4.1.3","yoctocolors":"^2.1.1","@vitest/coverage-v8":"^3.2.4","@jonahsnider/benchmark":"^5.1.1"},"_npmOperationalInternal":{"tmp":"tmp/simple-chalk_1.0.1_1752376736084_0.9692310400436883","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alcyone-labs/simple-chalk","version":"1.0.2","description":"A bundling-friendly, drop-in replacement for Chalk with basic terminal coloring features","type":"module","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.ts","maintainers":[{"name":"nembleton","email":"nicolas.embleton@gmail.com"}],"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./fast":{"types":"./dist/types/SimpleChalkFast.d.ts","import":"./dist/esm/SimpleChalkFast.js","require":"./dist/cjs/SimpleChalkFast.js"},"./browser":{"types":"./dist/types/SimpleChalkBrowser.d.ts","import":"./dist/esm/SimpleChalkBrowser.js","require":"./dist/cjs/SimpleChalkBrowser.js"}},"keywords":["chalk","cli","color","lightweight","mcp","simple-chalk","terminal"],"author":{"name":"Alcyone Labs"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Alcyone-Labs/simple-chalk.git"},"bugs":{"url":"https://github.com/Alcyone-Labs/simple-chalk/issues"},"homepage":"https://github.com/Alcyone-Labs/simple-chalk#readme","engines":{"node":">=14.0.0"},"devDependencies":{"@jonahsnider/benchmark":"^5.1.1","@types/node":"^24.0.12","@vitest/coverage-v8":"^3.2.4","ansi-colors":"^4.1.3","chalk":"^5.4.1","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.1.1","typescript":"^5.8.3","vitest":"^3.2.4","yoctocolors":"^2.1.1"},"scripts":{"build":"npm run build:clean && npm run build:types && npm run build:cjs && npm run build:esm","build:clean":"rm -rf dist","build:types":"tsc --project tsconfig.types.json","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","test":"vitest","test:run":"vitest run","test:coverage":"vitest run --coverage","lint":"tsc --noEmit","validate":"npm run lint && npm run test:run","benchmark":"npm run build && node benchmark.js","test:browser":"npm run build && echo 'Open browser-test.html in your browser to test browser compatibility'","publish:npm":"npm publish","publish:dry-run":"npm publish --dry-run"},"_id":"@alcyone-labs/simple-chalk@1.0.2","_integrity":"sha512-miidB6dy80FEM6r11fn587eu6vmb7gBHQGnjFyoUipqVQkOOKHdm/bzDvS7H6uFpFZhmclPpExujBOBspaiPhw==","_resolved":"/private/var/folders/27/xlh5p6rd54vgnqk_t2kq551c0000gn/T/047d1039d72af60f89078d9431172d12/alcyone-labs-simple-chalk-1.0.2.tgz","_from":"file:alcyone-labs-simple-chalk-1.0.2.tgz","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-miidB6dy80FEM6r11fn587eu6vmb7gBHQGnjFyoUipqVQkOOKHdm/bzDvS7H6uFpFZhmclPpExujBOBspaiPhw==","shasum":"6b36acba43a7f6c71be6fe030f49d8156f7585a1","tarball":"https://registry.npmjs.org/@alcyone-labs/simple-chalk/-/simple-chalk-1.0.2.tgz","fileCount":27,"unpackedSize":69789,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDwPHqsLxc3tgXEifSih1x6cU0f9lzfBy3iLfjzauLXaAiBqwXq/EpFerujqgJcouGqMk143O6O5Z7B1AFCiyXNbMQ=="}]},"_npmUser":{"name":"nembleton","email":"nicolas.embleton@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-chalk_1.0.2_1766411597868_0.8072878878346716"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-09T16:54:04.895Z","modified":"2025-12-22T13:53:18.536Z","1.0.0":"2025-07-09T16:54:05.150Z","1.0.1":"2025-07-13T03:18:56.277Z","1.0.2":"2025-12-22T13:53:18.026Z"},"bugs":{"url":"https://github.com/Alcyone-Labs/simple-chalk/issues"},"author":{"name":"Alcyone Labs"},"license":"MIT","homepage":"https://github.com/Alcyone-Labs/simple-chalk#readme","keywords":["chalk","cli","color","lightweight","mcp","simple-chalk","terminal"],"repository":{"type":"git","url":"git+https://github.com/Alcyone-Labs/simple-chalk.git"},"description":"A bundling-friendly, drop-in replacement for Chalk with basic terminal coloring features","maintainers":[{"name":"nembleton","email":"nicolas.embleton@gmail.com"}],"readme":"# SimpleChalk\n\nA bundling-friendly, drop-in replacement for Chalk with basic terminal coloring features.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Installation](#installation)\n- [Import Options](#import-options)\n- [Usage](#usage)\n- [Chalk Compatibility](#chalk-compatibility)\n- [Environment Variables](#environment-variable-support)\n- [Features](#features)\n- [Performance](#performance)\n- [Development](#development)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Overview\n\nSimpleChalk is a lightweight, zero-dependency alternative to the popular `chalk` library, designed for simplicity and performance. It provides a clean, familiar API for terminal colors while being incredibly fast and bundle-friendly. Perfect for CLI tools, logging libraries, and any application that needs reliable terminal coloring.\n\n### Simple and Powerful\n\n```typescript\n// Clean, familiar API\nimport chalk from '@alcyone-labs/simple-chalk';\nconsole.log(chalk.red.bold('Error message'));\n\n// Or choose the fastest option\nimport { fast } from '@alcyone-labs/simple-chalk';\nconsole.log(fast.redBold('Lightning fast!'));\n\n// Perfect for browsers too\nimport { browser } from '@alcyone-labs/simple-chalk';\nconsole.log(...browser.red('Works everywhere!'));\n```\n\n## Installation\n\n```bash\nnpm install @alcyone-labs/simple-chalk\n```\n\n```bash\npnpm add @alcyone-labs/simple-chalk\n```\n\n```bash\nyarn add @alcyone-labs/simple-chalk\n```\n\n## Import Options\n\nSimpleChalk provides multiple ways to import based on your needs:\n\n### Default Import (Full Chalk Compatibility)\n```typescript\nimport chalk from '@alcyone-labs/simple-chalk';\n\n// Full chaining support\nconsole.log(chalk.red.bold.underline('Fully compatible with Chalk'));\n```\n\n### Fast Version (Maximum Performance)\n```typescript\n// Option 1: Named import\nimport { fast } from '@alcyone-labs/simple-chalk';\nconsole.log(fast.redBold('140x faster than default'));\n\n// Option 2: Direct import\nimport chalk from '@alcyone-labs/simple-chalk/fast';\nconsole.log(chalk.redBold('Same performance, direct import'));\n```\n\n### Browser Support\n\nSimpleChalk provides **three approaches** for browser compatibility:\n\n#### Option 1: ANSI Codes (Chrome 69+)\n```html\n<script type=\"module\">\nimport chalk from '@alcyone-labs/simple-chalk';\nconsole.log(chalk.red('May show raw ANSI codes'));\n</script>\n```\n\n#### Option 2: CSS-Based (Recommended for Browsers)\n```html\n<script type=\"module\">\nimport chalk from '@alcyone-labs/simple-chalk/browser';\nconsole.log(...chalk.red('Proper colors using CSS'));\nconsole.log(...chalk.bold('Bold text using CSS'));\n</script>\n```\n\n#### Option 3: Named Import\n```typescript\nimport { browser } from '@alcyone-labs/simple-chalk';\nconsole.log(...browser.red('CSS-based colors'));\n```\n\n**Note**: The browser version returns `[text, cssStyle]` arrays, so use the spread operator (`...`) when logging.\n\n## Understanding ANSI Escape Codes\n\nANSI escape codes are special character sequences that control text formatting:\n\n- `[31m` = Start red text\n- `[1m` = Start bold text\n- `[0m` = Reset all formatting\n\nSo `[31mHello[0m` should display as red \"Hello\". While Chalk documentation mentions Chrome 69+ supports ANSI codes, this support is **inconsistent** across browsers and contexts.\n\n### The Problem\n```javascript\n// This might show raw codes: [31mRed text[0m\nconsole.log(chalk.red('Red text'));\n```\n\n### The Solution\n```javascript\n// This shows actual red text in browsers\nconsole.log(...chalk.red('Red text'));\n```\n\nThe browser-optimized version automatically detects the environment and uses the appropriate formatting method.\n\n## Usage\n\n```typescript\nimport chalk from '@alcyone-labs/simple-chalk';\n\n// Basic colors\nconsole.log(chalk.red('Error message'));\nconsole.log(chalk.green('Success message'));\nconsole.log(chalk.blue('Info message'));\n\n// Text styles\nconsole.log(chalk.bold('Bold text'));\nconsole.log(chalk.dim('Dimmed text'));\nconsole.log(chalk.underline('Underlined text'));\n\n// Chaining\nconsole.log(chalk.red.bold('Bold red text'));\nconsole.log(chalk.blue.underline('Underlined blue text'));\nconsole.log(chalk.green.bold.dim('Green, bold, and dimmed'));\n```\n\n## Chalk Compatibility\n\nSimpleChalk is designed as a **drop-in replacement** for Chalk's most commonly used features. Here's exactly what we support and what we don't:\n\n### ✅ Supported Features\n\n#### Basic Colors\n```typescript\nchalk.black('text')     // ✅ Supported\nchalk.red('text')       // ✅ Supported\nchalk.green('text')     // ✅ Supported\nchalk.yellow('text')    // ✅ Supported\nchalk.blue('text')      // ✅ Supported\nchalk.magenta('text')   // ✅ Supported\nchalk.cyan('text')      // ✅ Supported\nchalk.white('text')     // ✅ Supported\nchalk.gray('text')      // ✅ Supported\nchalk.grey('text')      // ✅ Supported (alias for gray)\n```\n\n#### Text Modifiers\n```typescript\nchalk.bold('text')      // ✅ Supported\nchalk.dim('text')       // ✅ Supported\nchalk.underline('text') // ✅ Supported\n```\n\n#### Special Aliases\n```typescript\nchalk.blueBright('text') // ✅ Supported (maps to cyan)\n```\n\n#### Chaining\n```typescript\nchalk.red.bold('text')           // ✅ Supported\nchalk.blue.underline('text')     // ✅ Supported\nchalk.green.bold.dim('text')     // ✅ Supported\n// Any combination of colors and modifiers\n```\n\n#### Function Usage\n```typescript\nchalk('text')           // ✅ Supported (returns text as-is)\nchalk.red('text')       // ✅ Supported\n```\n\n#### Environment Variables\n```typescript\n// ✅ All supported\nprocess.env.NO_COLOR    // Disables colors\nprocess.env.FORCE_COLOR // Forces colors\nprocess.env.MCP_MODE    // Disables colors (SimpleChalk specific)\n```\n\n### ❌ Unsupported Features\n\n#### Background Colors\n```typescript\nchalk.bgRed('text')     // ❌ Not supported\nchalk.bgBlue('text')    // ❌ Not supported\nchalk.bgGreen('text')   // ❌ Not supported\n// All bg* methods are not supported\n```\n\n#### Advanced Text Styles\n```typescript\nchalk.italic('text')        // ❌ Not supported\nchalk.strikethrough('text') // ❌ Not supported\nchalk.inverse('text')       // ❌ Not supported\nchalk.hidden('text')        // ❌ Not supported\nchalk.overline('text')      // ❌ Not supported\n```\n\n#### 256-Color and TrueColor Support\n```typescript\nchalk.ansi256(93)('text')           // ❌ Not supported\nchalk.bgAnsi256(93)('text')         // ❌ Not supported\nchalk.rgb(255, 136, 0)('text')      // ❌ Not supported\nchalk.bgRgb(255, 136, 0)('text')    // ❌ Not supported\nchalk.hex('#FF8800')('text')        // ❌ Not supported\nchalk.bgHex('#FF8800')('text')      // ❌ Not supported\nchalk.hsl(32, 100, 50)('text')      // ❌ Not supported\nchalk.bgHsl(32, 100, 50)('text')    // ❌ Not supported\nchalk.hsv(32, 100, 100)('text')     // ❌ Not supported\nchalk.bgHsv(32, 100, 100)('text')   // ❌ Not supported\nchalk.hwb(32, 0, 50)('text')        // ❌ Not supported\nchalk.bgHwb(32, 0, 50)('text')      // ❌ Not supported\n```\n\n#### Template Literals\n```typescript\nchalk`{red Hello} {blue World}`     // ❌ Not supported\n```\n\n#### Utilities (Non-Chalk Extensions)\n\n- `clear`: [NON-CHALK EXTENSION] Returns an ANSI escape sequence that clears the screen and the scrollback buffer (equivalent to CMD+K). **Note: This method is not available in the original `chalk` library.**\n\n```javascript\nimport chalk from '@alcyone-labs/simple-chalk';\n\n// Print the clear sequence to the terminal (clears screen + scrollback)\nprocess.stdout.write(chalk.clear);\n```\n\n#### Color Level Detection\n```typescript\nchalk.level                         // ❌ Not supported\nchalk.supportsColor                 // ❌ Not supported\n```\n\n#### Bright Colors (except blueBright)\n```typescript\nchalk.redBright('text')             // ❌ Not supported\nchalk.greenBright('text')           // ❌ Not supported\nchalk.yellowBright('text')          // ❌ Not supported\n// Only blueBright is supported (as alias for cyan)\n```\n\n### 🎯 Migration Strategy\n\nFor **90%+ of use cases**, SimpleChalk is a perfect drop-in replacement:\n\n```typescript\n// These work identically in both Chalk and SimpleChalk\nconsole.log(chalk.red('Error'));\nconsole.log(chalk.green.bold('Success'));\nconsole.log(chalk.yellow.underline('Warning'));\n```\n\nIf you need unsupported features, you have options:\n\n1. **Use conditional imports** for advanced features:\n```typescript\nconst chalk = process.env.BUNDLED\n  ? require('@alcyone-labs/simple-chalk')\n  : require('chalk');\n```\n\n2. **Fallback to ANSI codes** for missing features:\n```typescript\n// Instead of chalk.bgRed('text')\nconsole.log('\\x1b[41m' + text + '\\x1b[0m');\n```\n\n3. **Use full Chalk** in development, SimpleChalk in production builds\n\n## Environment Variable Support\n\nSimpleChalk respects standard color environment variables:\n\n| Variable | Effect |\n|----------|--------|\n| `NO_COLOR` | Disables all colors |\n| `FORCE_COLOR` | Forces colors even in non-TTY environments |\n| `MCP_MODE` | Disables colors for MCP compliance |\n\n```typescript\n// Disable colors\nprocess.env.NO_COLOR = '1';\nconsole.log(chalk.red('Error')); // Outputs: \"Error\" (no colors)\n\n// Force colors\nprocess.env.FORCE_COLOR = '1';\nconsole.log(chalk.red('Error')); // Outputs: \"\\x1b[31mError\\x1b[0m\" (with colors)\n```\n\n## Features\n\n### 🎯 Three Optimized Versions\n\n**Default**: Full Chalk compatibility with chaining\n```typescript\nchalk.red.bold.underline('Full compatibility')\n```\n\n**Fast**: Maximum performance with pre-created combinations\n```typescript\nchalk.redBold('23.8M operations/second')\n```\n\n**Browser**: CSS-based colors for perfect browser support\n```typescript\nconsole.log(...chalk.red('Perfect browser colors'))\n```\n\n### 🔧 Smart Features\n- **Automatic environment detection** (Node.js vs Browser)\n- **Respects color preferences** (NO_COLOR, FORCE_COLOR, MCP_MODE)\n- **TypeScript support** with full type definitions\n- **Universal compatibility** across all JavaScript environments\n\n## Why SimpleChalk?\n\n### Key Benefits\n\n- **Incredibly Fast**: Fast package is very fast\n- **Zero Dependencies**: No external packages, no bloat\n- **Lightweight**: Minimal footprint, fast startup\n- **Simple**: Clean, predictable API without complexity\n- **Universal**: Works in Node.js, browsers, and bundled applications\n- **Multiple Versions**: Choose between compatibility and performance\n- **Reliable**: Consistent behavior across all environments\n\n## Migration from Chalk\n\n### Simple Migration\n\n```typescript\n// Before\nimport chalk from 'chalk';\n\n// After\nimport chalk from '@alcyone-labs/simple-chalk';\n\n// All your existing code works the same!\nconsole.log(chalk.red.bold('Hello World'));\n```\n\n### Unsupported Features\n\nSimpleChalk focuses on the most commonly used chalk features. The following are not supported:\n\n- **RGB/Hex colors**: `chalk.rgb(255, 0, 0)`, `chalk.hex('#FF0000')`\n- **Background colors**: `chalk.bgRed()`, `chalk.bgBlue()`\n- **Advanced styles**: `chalk.strikethrough()`, `chalk.inverse()`\n- **Template literals**: `chalk\\`{red Hello} World\\``\n\nIf you need these features, use the full chalk library in non-bundled environments.\n\n## Performance\n\nSimpleChalk offers **two versions** with different performance characteristics:\n\n### Version Comparison\n\n| Version | ops/sec | Use Case |\n|---------|---------|----------|\n| **Fast** | **23,809,524** | Maximum performance, pre-created combinations |\n| **Default** | **171,380** | Full Chalk compatibility, dynamic chaining |\n\n### Full Benchmark Results\n\n```\n┌─────────┬──────────────────────────┬──────────────┐\n│ (index) │ library                  │ ops/sec      │\n├─────────┼──────────────────────────┼──────────────┤\n│ 0       │ 'simple-chalk-fast'      │ '23,809,524' │\n│ 1       │ 'yoctocolors'            │ '8,000,000'  │\n│ 2       │ 'colorette'              │ '8,000,000'  │\n│ 3       │ 'picocolors'             │ '8,000,000'  │\n│ 4       │ 'nanocolors'             │ '5,988,024'  │\n│ 5       │ 'chalk'                  │ '4,784,689'  │\n│ 6       │ 'kleur'                  │ '4,784,689'  │\n│ 7       │ 'kleur/colors'           │ '4,807,692'  │\n│ 8       │ 'ansi-colors'            │ '2,183,406'  │\n│ 9       │ 'cli-color'              │ '615,385'    │\n│ 10      │ 'simple-chalk (default)' │ '171,380'    │\n└─────────┴──────────────────────────┴──────────────┘\n```\n\n### Performance Trade-offs\n\n**Fast Version** is the very fast:\n- **23.8 million ops/sec**\n- **~0.04 microseconds per operation**\n- But no dynamic chaining\n\n**Default Version** prioritizes compatibility:\n- **171,380 operations/second** - still fast for typical usage\n- **~6 microseconds per operation** - imperceptible in real applications\n- **Full Chalk API compatibility** - dynamic chaining works\n- **Zero dependencies** - no bundling complexity\n\n### Choosing the Right Version\n\n**Use Fast Version** (`/fast`) when:\n- Performance is critical (logging libraries, high-frequency output)\n- You don't need complex chaining (`chalk.red.bold.dim`)\n- You can use pre-created combinations (`redBold`, `greenUnderline`)\n- You want the absolute fastest color library available\n\n**Use Default Version** when:\n- You need full Chalk API compatibility\n- You use complex chaining like `chalk.red.bold.dim.underline`\n- You're migrating from Chalk with minimal code changes\n- API flexibility is more important than raw performance\n\n**Both versions work in**:\n- Node.js (all versions)\n- Modern browsers (Chrome, Firefox, Safari)\n- Bundled applications (Webpack, Vite, etc.)\n- TypeScript projects\n\n### Run Your Own Benchmarks\n\n```bash\nnpm run benchmark     # Run performance comparison\n```\n\n## Development\n\n### Building\n\n```bash\nnpm run build          # Build all formats\nnpm run build:cjs      # Build CommonJS\nnpm run build:esm      # Build ES modules\nnpm run build:types    # Build TypeScript definitions\n```\n\n### Testing\n\n```bash\nnpm test              # Run tests in watch mode\nnpm run test:run      # Run tests once (74 tests)\nnpm run test:coverage # Run tests with coverage\n```\n\n**Comprehensive test coverage** includes:\n- ✅ **26 tests** for default version (full Chalk compatibility)\n- ✅ **34 tests** for fast version (performance optimized)\n- ✅ **14 tests** for browser version (CSS-based colors)\n- ✅ All color functions, modifiers, and combinations\n- ✅ Environment variable handling (NO_COLOR, FORCE_COLOR, MCP_MODE)\n- ✅ Both Node.js and browser environment detection\n\n### Publishing\n\n```bash\nnpm run validate      # Run linting and tests\nnpm run publish:dry-run  # Test publish without actually publishing\nnpm run publish:npm   # Publish to NPM\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**Q: Colors not showing in terminal**\nA: Check if `NO_COLOR` is set or if you're in a non-TTY environment.\n\n**Q: Colors showing in MCP mode**\nA: Ensure `process.env.MCP_MODE` is set before importing SimpleChalk.\n\n**Q: Module not found errors**\nA: Make sure you're importing from `@alcyone-labs/simple-chalk` and not a local path.\n\n## Contributing\n\nTo contribute to SimpleChalk:\n\n1. **File Issues**: Report bugs or feature requests on GitHub\n2. **Submit PRs**: Add new features or improve performance\n3. **Test Coverage**: Help test on different platforms and environments\n\n### Development Setup\n\n```bash\ngit clone https://github.com/Alcyone-Labs/simple-chalk\ncd simple-chalk\npnpm install\npnpm test\n```\n\n## Changelog\n\n### [1.0.2] - 2025-12-22\n\n#### Added\n- **[NON-CHALK EXTENSION]** Added `clear` property to truly clean the screen and scrollback buffer (equivalent to CMD+K).\n- Added `clear` support across all library variants:\n    - `SimpleChalk`: Chainable `clear` property.\n    - `SimpleChalkFast`: Direct `clear` property.\n    - `SimpleChalkBrowser`: `clear` property (uses `console.clear()` in browsers).\n- Added Table of Contents to README for better navigation.\n- Added explicit [NON-CHALK EXTENSION] labels in JSDoc for added clarity.\n\n### [1.0.1] - 2025-07-13\n- Initial stable release.\n\n## License\n\nMIT License - see LICENSE file for details.\n","readmeFilename":"README.md"}