terminal-pretty
Version:
A simple terminal beautifier for styled error and logs.
93 lines (45 loc) ⢠1.68 kB
Markdown
*Make your terminal errors and warnings easy to spot and debug.*
terminal-pretty automatically hooks into your console to enhance and colorize error-related messages like console.error, console.warn, uncaught exceptions, and unhandled promise rejections.
- Automatically formats:
- console.error
- console.warn
- Uncaught exceptions
- Unhandled promise rejections
- Adds clear labels and color coding for better visibility
- Helps quickly locate and debug critical issues during development
```bash
npm install terminal-pretty
š§ Usage
Just require it at the top of your entry file (like index.js or app.js):
require('terminal-pretty');
console.warn("This is a warning");
console.error("This is an error");
throw new Error("Uncaught error will be handled too!");
Promise.reject("Rejected promise also handled!");
šØ Output Example
[ā ļø WARNING @ 12:30:12] This is a warning
[ā ERROR @ 12:30:14] This is an error
[ā ERROR @ 12:30:15] Uncaught error will be handled too!
Colors are powered by chalk.
š Folder Structure
console-beauty/
āāā index.js
āāā package.json
āāā README.md
āāā LICENSE
āāā .gitignore
š License
MIT License
Copyright Ā© 2025 [Vighnesh Gholap]
ā¤ļø Contributing
Found a bug or want to add features? PRs are welcome!
š GitHub
https://github.com/VighneshGholap2002/terminal-pretty
š¦ Coming Soon
Custom error/warning themes
Toggle for showing/hiding stack traces
Log level filters
Optional file logging