better-cli-alerts
TypeScript icon, indicating that this package has built-in type declarations

2.2.2 • Public • Published

Cross platform CLI Alerts with colors with Catpuccin colors and custom messages. Work on macOS, Linux, and Windows.

Install

npm install better-cli-alerts

Usage

const alert = require("better-cli-alerts");
// or if you use modules
import alert from "better-cli-alerts";

// Success message
alert({
  type: `success`,
  message: ` All is good! `,
  description: `YAY :)!`,
});

// Info message
alert({
  type: `info`,
  message: ` Some useful info `,
  description: `FYI...`,
});

// Warning message
alert({
  type: `warning`,
  message: ` Careful! `,
  description: `CAREFUL :/`,
});

// Error message
alert({
  type: `error`,
  message: ` Something is wrong! `,
  description: `OOPS! :(`,
});

// Using custom messages
alert({
  type: `error`,
  message: ` Something is wrong! `,
  description: `YOUR CUSTOM MESSAGE`,
});

API

alert(options)

❯ options

Type: object
Default: {}

You can specify the options below.

❯ type

Type: string
Default: error

❯ msg

Type: string
Default: You forgot to define all options. (Error message)

❯ description

Type: string
Default: '' (Empty string)

License & Conduct

Connect

GitHub @Memnoc (follow) Follow me on Github


Credits

Chalk library Chalk For providing a zero dependency way to bring colors to the terminal ◓

Log Symbols Log Symbols For providing beautifully simple icons to complement the error messages 🔣

Catpuccin palette Catpuccin Simply the best theme palette for anything, and the one we use here 🐈

GitHub @AhmadAwais Ahmad Awais For introducing me to the amazing world of CLI tools written in Node and JavaScript 🚀

Readme

Keywords

Package Sidebar

Install

npm i better-cli-alerts

Weekly Downloads

13

Version

2.2.2

License

MIT

Unpacked Size

13.3 kB

Total Files

17

Last publish

Collaborators

  • memnoc