Open menu dropdown
@maz-ui/node
Lightweight Node.js utilities — promise-based shell execution, an opinionated consola-backed logger, and a banner printer for CLIs.
@maz-ui/node powers the CLIs and build scripts inside the maz-ui ecosystem. It's intentionally tiny: an exec wrapper that returns a real Promise, a colourful logger built on consola, and a banner helper using figlet.
Installation
bash
pnpm add @maz-ui/nodebash
npm install @maz-ui/nodebash
yarn add @maz-ui/nodeBasic usage
ts
import { execPromise, logger, printBanner } from '@maz-ui/node'
printBanner({ name: 'my-cli', version: '1.0.0' })
logger.info('Running tests…')
await execPromise('npm test', { packageName: 'tests' })
logger.success('Done')What's inside
execPromise— Promise-basedchild_process.execwith structured logging.logger/createLogger— consola-backed logger with semantic log levels and helpers (box,divider,brand, …).printBanner— ASCII-art banner printer (figlet) with versioning, dividers and clearing.
Requirements
- Node.js >= 22.12.0
- ESM only — published as
"type": "module".