npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-noti

v0.1.0

Published

Zero-dependency native desktop notifications for Node.js on macOS, Windows, and Linux.

Readme

node-noti

Zero-dependency native desktop notifications for Node.js.

Developed by Yohannes Sisay.

node-noti uses OS-provided notification paths instead of bundling a webview or native binary:

  • macOS: osascript and Notification Center
  • Windows: built-in PowerShell with .NET tray balloon notifications
  • Linux: notify-send from the freedesktop/libnotify desktop notification stack

No runtime dependencies are installed or required.

Install

npm install node-noti

For local global testing from this project folder:

npm link
noti "Hello from noti" --success

Usage

const { notify, success, warning, error, info } = require("node-noti");

await notify({
  title: "Build finished",
  message: "The release package is ready.",
  variant: "success",
  appName: "Release Bot",
  timeout: 4000
});

await success("Deploy completed");
await warning("Disk usage is high");
await error("Backup failed");
await info("Sync started");

Short form:

const { notify } = require("node-noti");

await notify("Upload complete", "All files were synced.");

API

notify(options)

Shows a native notification and resolves with metadata about the backend used.

interface NotifyOptions {
  title: string;
  message?: string;
  variant?: "success" | "warning" | "error" | "info";
  subtitle?: string;
  appName?: string;
  sound?: boolean | string;
  icon?: string;
  timeout?: number;
  urgency?: "low" | "normal" | "critical";
}

isSupported(platform?)

Checks whether the current OS backend is available.

const { isSupported } = require("node-noti");

if (await isSupported()) {
  await notify("Ready", "Notifications are available.");
}

createNotifier(platform?)

Creates the platform-specific notifier service.

CLI

After npm link or global installation, use:

noti "Build completed" --success
noti "Disk usage is high" --warning --title "System"
noti "Backup failed" --error --timeout 7000
noti "Sync started" --info --app-name "Worker"

Supported flags:

  • --title <text>
  • --app-name <text>
  • --timeout <ms>
  • --success
  • --warning
  • --error
  • --info

Platform Notes

macOS works on Intel and Apple Silicon because it uses the system osascript executable.

Windows uses built-in Windows PowerShell and System.Windows.Forms.NotifyIcon, which works without external modules. It intentionally avoids optional PowerShell modules such as BurntToast.

Linux desktop notifications are fragmented. This package uses notify-send because it is the standard command-line bridge for freedesktop/libnotify notifications. Minimal server images and stripped desktop environments may not include it.

Variant behavior depends on what the OS backend exposes. Windows maps variants to native tray balloon icons. Linux maps variants to freedesktop urgency and standard icon names unless a custom icon is supplied. macOS Notification Center does not expose success, warning, or error styling through osascript, so the variant is accepted for API consistency without forcing non-native styling.

Security

User-supplied notification text is validated, length-limited, and passed to OS tools without shell interpolation. The Windows backend embeds payload data as base64 JSON inside an encoded PowerShell command to avoid command injection through text fields.

Verification

npm run lint
npm run verify

The package ships compiled JavaScript in dist so consumers do not need TypeScript or any build dependency at install time.