@zokugun/cli-utils
v0.2.0
Published
Utils for CLI app
Readme
@zokugun/cli-utils
A small collection of focused utilities to build user-friendly Node.js command-line applications.
It bundles lightweight helpers so you can compose rich CLI interactions without pulling in many separate packages:
- colored output (https://github.com/doowb/ansi-colors)
- spinner frames (https://github.com/sindresorhus/cli-spinners)
- prompt utilities (https://github.com/enquirer/enquirer)
- a tiny commander wrapper (https://github.com/tj/commander.js)
- a simple logger (use https://github.com/zokugun/node-log-update-plus)
Compatible with Node.js 18.x.
Installation
npm install @zokugun/cli-utilsQuick Start
import { logger } from '@zokugun/cli-utils';
logger.begin(); // start timer
logger.progress('Starting task'); // use spinner to indicate progress
logger.success('Task finished');
logger.finish(); // print "🏁 Done (in 1s)."Quick Reference
- ansi-colors: small helpers for colored and styled terminal output.
- cli-spinners: common spinner frame sets and metadata for progress indicators.
- commander: thin convenience exports for building CLI commands.
- enquirer: prompt helpers for interactive prompts (+ patch and
confirm,Invisible). - logger: simple logging helpers for consistent CLI output.
Module entry points
Choose the entry point that matches your environment and naming preferences:
| Import path | Description |
| --------------------------------- | -------------------------------- |
| @zokugun/cli-utils | All utilities |
| @zokugun/cli-utils/ansi-colors | colors from ansi-colors |
| @zokugun/cli-utils/cli-spinners | spinners from cli-spinners |
| @zokugun/cli-utils/commander | tiny command from commander |
| @zokugun/cli-utils/enquirer | prompt utilities from enquirer |
| @zokugun/cli-utils/logger | the logger |
Donations
Support this project by becoming a financial contributor.
License
Copyright © 2026-present Baptiste Augrain
Licensed under the MIT license.
