Skip to main content

Notifications

Use node-notifier for cross-platform OS notifications.

Example:

import {Command} from '@oclif/core'
import * as notifier from 'node-notifier'

export class MyCommand extends Command {
async run() {
notifier.notify({
title: 'My notification',
message: 'Hello!'
})
}
}

Demo:

notification demo

node-notifier is capable of much more such as adding images, sounds, and even buttons and user input.