CLI Error Handler

JSON →
library 6.2.0 ·javascript
verified May 27, 2026

handle-cli-error is a robust error handling library specifically designed for Node.js command-line interface (CLI) applications. It provides a comprehensive solution for displaying errors to users in a clear, consistent, and visually appealing manner, then gracefully exiting the process. The current stable version is 6.2.0, with frequent minor releases introducing new features and improvements, such as enhanced customization options. Key differentiators include its ability to generate pretty, colorized error output with icons and headers, support for error class-specific handling (allowing different exit codes or logging behaviors per error type), graceful process exit with customizable timeouts, and automatic normalization of invalid Error objects using `normalize-exception`. It also allows fine-grained control over what error details are logged, such as stack traces, nested error causes, and additional error properties, making it highly configurable for various CLI needs.

total hits 16
actors 7 distinct systems
last hit 1d ago Amazonbot
MetaBot
4
GPTBot
2
Script
1
Amazonbot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇬🇧 United Kingdom · 🇩🇪 Germany