CLI Source Code Preview
JSON →cli-source-preview is a JavaScript utility designed to render syntax-highlighted source code snippets directly in the command-line interface. It's particularly useful for enhancing error messages or debug outputs by providing relevant code context, complete with line numbers and customizable colorization. The current stable version is 1.1.0. This package offers a focused solution for presenting code in a terminal environment, distinguishing itself by integrating `chalk` for robust ASCII color support. Developers can specify single lines, line ranges, or even precise line/column positions for the preview, with options to control the number of surrounding context lines and the line delimiter. Given its specific utility and the current version, it's maintained to ensure compatibility and address any critical bugs, rather than undergoing frequent feature-driven releases.
Traffic · last 30 days ↓80% vs prev 7d
top countries 🇩🇪 Germany · 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore