node-notifier sends native desktop notifications from Node.js on macOS, Windows, and Linux. It routes to Notification Center, Windows toasts, notify-send, or Growl depending on the platform.
Overview
node-notifier is an ES module package for scripts and applications that need OS-level notification UI from Node. It selects a backend per platform: Notification Center on macOS via terminal-notifier, SnoreToast toasts on Windows 8+, notify-send on Linux, with Growl as fallback.
The default export picks the notifier automatically; dedicated classes expose platform-specific options such as macOS actions, Windows app IDs, and Linux notify-send actions. TypeScript types ship with the package, and require() remains supported through Node's require(esm) path.
Electron apps must unpack bundled vendor binaries from asar archives. Cron, PM2, and Windows services need the process to run as the logged-in desktop user so notifications reach the correct session.
A companion CLI, node-notifier-cli, offers shell access without adding the library to a project. Node 22.22+, 24.15+, or 26+ is required.
Key features
- macOS Notification Center integration
- Windows toast and balloon backends
- Linux notify-send support
- Platform-specific notifier classes
- Electron and bundler guidance
- Bundled terminal-notifier binaries
- Optional node-notifier-cli companion
Use cases
- Desktop alerts from Node automation scripts
- Build finished notifications in dev tools
- Cross-platform CLI status toasts