Skip to content

Memnoc/better-cli-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: `SUCCESS`
});

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

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

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

// 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

Blog: matechblog.com (read) Sometimes I write about tech, tutorials and passions.


Credits

GitHub @AhmadAwais Ahmad Awais This package was developed as part of Ahmad's Node CLI course that I strongly recommend <3

Catpuccin palette Catpuccin Simply the best theme palette for anything 💜

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published