{"library":"node-notifier-cli","title":"Node Notifier CLI","description":"node-notifier-cli is a command-line interface (CLI) package that provides a convenient way to send cross-platform desktop notifications. It acts as a wrapper around the `node-notifier` library, enabling users to trigger notifications directly from their terminal or shell scripts without writing JavaScript code. It supports various notification systems including macOS Notification Center (since 10.8), Windows Toast notifications, Growl, and `notify-send` for Linux. Version 2.0.0 is the current stable release, with its last major update occurring approximately five years ago. Its release cadence is closely tied to its underlying `node-notifier` library, which provides the core notification functionality. The package differentiates itself from programmatic notification libraries by offering a simple, unified command-line syntax for sending messages, titles, icons, and even opening URLs on click, focusing solely on CLI usability.","language":"javascript","status":"maintenance","last_verified":"Wed Apr 22","install":{"commands":["npm install node-notifier-cli"],"cli":{"name":"node-notifier","version":null}},"imports":["notify -t 'Task Complete' -m 'Your build finished successfully!'","npx -p node-notifier-cli notify -t 'Reminder' -m 'Don\\'t forget that meeting at 3 PM!' -s Glass","import { spawn } from 'child_process';\n\nconst title = 'System Alert';\nconst message = 'Disk space low! Cleanup recommended.';\nconst icon = 'https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg';\n\nconst child = spawn('notify', ['-t', title, '-m', message, '--icon', icon, '-s', 'Basso']);\n\nchild.on('error', (err) => {\n  console.error('Failed to start notify process:', err.message);\n});\n\nchild.on('close', (code) => {\n  if (code !== 0) {\n    console.warn(`notify process exited with code ${code}`);\n  }\n});"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# Install globally (recommended for CLI usage)\nnpm i -g node-notifier-cli\n\n# Basic notification\nnotify -t 'Hello World' -m 'This is a test notification from the CLI.'\n\n# Notification with sound and opening a URL on click\nnotify -t 'GitHub Update' -m 'New pull request on your repository!' -s Basso --open 'https://github.com/mikaelbr/node-notifier-cli'\n\n# Notification with a custom icon\nnotify -t 'Agent Coulson' --icon 'https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg' -m 'I know, right?'\n\n# Pipe content to message\necho \"This message comes from stdin!\" | notify -t \"Piped Message\"","lang":"bash","description":"Demonstrates global installation and various ways to send desktop notifications, including titles, messages, sounds, custom icons, opening URLs, and piping input.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}