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

task-complete-notify

v1.0.6

Published

Pi extension that sends desktop notification + chime when a reply finishes. Supports duration threshold and explicit notify tool.

Readme

task-complete-notify

Pi extension: desktop notification + chime when a reply finishes, with configurable duration threshold.

Only notifies when you actually need to be reminded.

npm version License: MIT Pi Extension

Why?

When Pi runs a long task in the terminal, you often switch away to do something else. Coming back to check repeatedly wastes time. This extension pops a desktop notification + chime the moment a reply settles, so you know immediately.

What sets it apart

| Feature | task-complete-notify | Other notifiers | |---------|---------------------|-----------------| | Configurable duration threshold | ✅ Only notify on tasks > N seconds | ❌ Usually always notify | | Model-callable notify tool | ✅ Success/failure status | Partially | | Chinese status support | ✅ "完成" / "失败" | ❌ | | Multi-player auto-detection | ✅ mpv/ffplay/pw-play/cvlc/paplay | Fewer | | Platform | Currently Linux | Depends |

Install

pi install npm:task-complete-notify
# or
pi install git:github.com/lxp731/task-complete-notify

Platform: currently Linux only (requires notify-send + D-Bus notification service).

Configuration

| Method | Usage | Priority | |--------|-------|----------| | Env var | export PI_NOTIFY_THRESHOLD=60 | Highest (per session) | | Command | /notify-threshold 60 | Persisted to config.json | | Default | 0 = always notify | Lowest |

Disable auto-notify: set a very large threshold, e.g. 9999 seconds:

export PI_NOTIFY_THRESHOLD=9999     # per session
/notify-threshold 9999              # persisted (config.json)

Mute (no popup, no chime):

export PI_NO_NOTIFY=1

Usage

Automatic Notification

Works out of the box — fires a desktop notification + chime on every agent_settled event. Default threshold is 0 (always notify). Adjust to only alert on long-running tasks:

/notify-threshold 30    # only notify if reply took >30s
/notify-threshold       # show current threshold

Explicit Invocation

The model can call the notify tool to send a notification for important events like task failure or long-running task completion:

notify(message: "Data export complete: 100,000 records", status: "完成")
notify(message: "Build failed: TypeScript compilation error", status: "失败")

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | message | string | Yes | Notification content | | status | "完成" / "失败" | No | Defaults to "完成"; determines popup title and icon |

FAQ

Q: Why no notification pops up?

  1. Make sure libnotify is installed (notify-send command is available)
  2. Your desktop must support D-Bus notifications (GNOME, KDE, XFCE, etc.)
  3. Check PI_NO_NOTIFY is not set to 1
  4. If a threshold is set, confirm the task actually took longer than the threshold

Q: I see the popup but hear no sound?

The extension tries players in order: mpv → ffplay → pw-play → cvlc → paplay. Install at least one (recommended: mpv).

Q: How do I temporarily turn off notifications?

export PI_NO_NOTIFY=1 or set a huge threshold like 9999.

Q: Does it support macOS / Windows?

Not yet. Currently Linux only. Cross-platform support is on the roadmap.

Dependencies

  • Desktop notification: notify-send (libnotify)
  • Audio: mpv (or ffplay / pw-play / cvlc / paplay)
  • Linux desktop environment (D-Bus notification service)

Directory Structure

extensions/
├── index.ts            # main entry
└── assets/
    └── prompt-tone.mp3 # notification chime