{"library":"cli-source-preview","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","source","highlight","preview"],"last_verified":"Wed May 27","install":[{"cmd":"npm install cli-source-preview","imports":["const preview = require('cli-source-preview')","const preview = require('cli-source-preview'); const readSource = preview.readSource;"]},{"cmd":"yarn add cli-source-preview","imports":[]},{"cmd":"pnpm add cli-source-preview","imports":[]}],"homepage":null,"github":"https://github.com/yibn2008/cli-source-preview","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/cli-source-preview","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/cli-source-preview/compatibility"}}