alerta-cli

1.0.0 • Public • Published

alerta-cli screenshot

Cross platform CLI Alerts with colors & colored symbols for success, info, warning, error.
Work on macOS, Linux, and Windows.

DOWNLOADS Follow @MrUmairAfzal on Twitter


alerta-cli

📟

Install

npm install alerta-cli

⚙️

Usage

const alert = require('alerta-cli');

// Provide the type, msg, and name options.
alert({type: `success`, msg: `Everything finished!`});
// Prints: ✔ SUCCESS Everything finished!

alert({type: `success`, msg: `Everything finished!`, name: `DONE`});
// Prints: ✔ DONE Everything finished!

alert({type: `warning`, msg: `You didn't add something!`});
// Prints: ⚠ WARNING You didn't add something!

alert({type: `info`, msg: `Umair is awesome!`});
// Prints: ℹ INFO Umair is awesome!

alert({type: `error`, msg: `Something went wrong!`});
// Prints: ✖ ERROR Something went wrong!

📃

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)

❯ name

Type: string
Default: '' (Empty string)


📃

License & Conduct


🙌

Connect

GitHub @MuhammadUmair1019 (follow) To stay up to date on free & open-source software

Twitter @MrUmairAfzal (follow) To get #OneDevMinute daily hot tips & trolls

YouTube Muhammad Umair (subscribe) To tech talks & #OneDevMinute videos

LinkedIn @MrUmairAfzal (connect) On the LinkedIn profile y'all


Package Sidebar

Install

npm i alerta-cli

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

6.58 kB

Total Files

4

Last publish

Collaborators

  • umair-dev