cli-high is a lightweight, MIT-licensed JavaScript library providing syntax highlighting specifically designed for terminal output. It is currently at version 0.4.3 and appears to be in active development, having been introduced around 2024. As a "tiny" utility, it prioritizes minimal dependencies and a focused scope, primarily offering a single `highlight` function for programmatic use. The library ships with TypeScript types, enabling a robust development experience in TypeScript projects. While its release cadence isn't explicitly defined, as a 0.x.x version, users should anticipate potential API changes in minor or even patch releases. Its primary differentiators are its small footprint and dedicated purpose for aesthetic CLI output, rather than complex, browser-based highlighting solutions.
npm install cli-highVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic use of `cli-high` to syntax-highlight JavaScript and JSON code for terminal output, including specifying language and theme options.
Always refer to the official GitHub repository and any provided changelog or release notes before upgrading to ensure compatibility with your codebase. Pinning exact versions is recommended for production.
Ensure your project is configured for ES Modules (e.g., `'type': 'module'` in `package.json` or `.mjs` file extension). If you must use CommonJS, consider dynamic `import()` or verify the package's CJS export compatibility.
Verify that you are using a named import: `import { highlight } from 'cli-high'`. Check your bundler's configuration for ESM compatibility and ensure no conflicting default imports or incorrect aliasing.To use ESM, add `'type': 'module'` to your `package.json` file, or save your script files with a `.mjs` extension. Alternatively, if you need to load ESM in a CJS context, use dynamic import: `const { highlight } = await import('cli-high');`.Double-check the file path provided to the `npx cli-high` command. Ensure the file exists and the path is either absolute or correct relative to your current working directory.
No dependency data recorded yet.