{"library":"ansi-fragments","type":"library","category":null,"description":"ansi-fragments is a compact JavaScript library designed for constructing aesthetically pleasing command-line interface (CLI) outputs using ANSI escape codes. Currently at version 0.2.1, it adopts a unique builder-pattern approach, allowing developers to compose styled text fragments programmatically. The library provides functions like `color`, `modifier`, `container`, `pad`, `fixed`, `ifElse`, and `provide` to encapsulate styling logic. Its core differentiator is the explicit fragment building and the `.build()` method, which converts the fragment tree into a single ANSI-encoded string. While a relatively new project, its focus is on providing a 'nice DX' for structured CLI logging rather than offering an exhaustive list of all possible ANSI features. Release cadence is infrequent, typical for a micro-utility library in its early stages.","language":"javascript","status":"active","version":"0.2.1","tags":["javascript","cli","ansi"],"last_verified":"Wed May 27","install":[{"cmd":"npm install ansi-fragments","imports":["import { color } from 'ansi-fragments';","import { modifier } from 'ansi-fragments';","import { container } from 'ansi-fragments';"]},{"cmd":"yarn add ansi-fragments","imports":[]},{"cmd":"pnpm add ansi-fragments","imports":[]}],"homepage":null,"github":"https://github.com/zamotany/ansi-fragments","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ansi-fragments","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/ansi-fragments/compatibility"}}