cli-boxes is a utility package providing a collection of pre-defined ASCII and Unicode box character sets, formatted as JSON objects, for rendering borders in terminal applications. It is currently at version 4.0.1 and is actively maintained by Sindre Sorhus, with releases primarily driven by Node.js LTS version compatibility and major architectural shifts like the move to pure ESM. Unlike full terminal UI libraries, cli-boxes focuses solely on delivering the raw character data, allowing other packages (like `boxen`) to handle the actual drawing logic. This makes it a lightweight and foundational component for console-based interfaces, distinguishing it from more comprehensive alternatives by its single-purpose design.
npm install cli-boxesVerified import paths — ran on the pinned version, not inferred.
Demonstrates importing the `cli-boxes` module, accessing the character definitions for the 'single' and 'double' box styles, and a simple example of how to use them to print a basic box in the terminal.
Migrate your project to use ES modules by setting `"type": "module"` in `package.json`, updating your `import` statements, and ensuring Node.js 18+ is installed. For CommonJS projects that cannot migrate, pin `cli-boxes` to a version lower than 4.0.0 (e.g., `^3.0.0`).
Update any custom box definitions to use the new key names: `vertical` becomes `left` and `right`, `horizontal` becomes `top` and `bottom`. Refer to the diff provided in the v3.0.0 release notes.
Update your code to use the camelCase names `cliBoxes.singleDouble` and `cliBoxes.doubleSingle` instead of `cliBoxes['single-double']` and `cliBoxes['double-single']`.
Change your `require('cli-boxes')` statement to `import cliBoxes from 'cli-boxes';` and ensure your `package.json` has `"type": "module"` or your file uses the `.mjs` extension. Upgrade Node.js to version 18 or higher. If you cannot migrate to ESM, downgrade `cli-boxes` to version `3.x`.Update your custom box definitions to use the new property names: `left`, `right`, `top`, and `bottom` instead of `vertical` and `horizontal`.
Use the camelCase equivalent for the box name, e.g., `cliBoxes.singleDouble` instead of `cliBoxes['single-double']`.
No dependency data recorded yet.