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

hearkn

v0.1.0

Published

Push notifications for AI coding agents — know when your agent needs you

Downloads

20

Readme

harkn

Push notifications for AI coding agents via ntfy.sh. Know when your agent needs you — from your phone, another monitor, or across the room.

Works with Claude Code, Codex, Gemini CLI, OpenCode, and any agent that supports hook systems. Compatible with VS Code Remote SSH, Cursor, and plain SSH terminals.

What it does

When your AI coding agent stops, needs permission, or asks a question, you get a push notification on your phone (or desktop). Tapping the notification focuses the correct VS Code window.

| Event | Notification | |-------|-------------| | Task completed | "Done: {summary of last response}" | | Waiting for input | "Waiting for your input" | | Permission needed | "Permission needed to continue" (high priority) | | Question asked | "Question — needs your answer" |

Notifications show the project folder and SSH hostname (e.g., my-project [SSH: myserver]) matching your VS Code window title.

Install

Prerequisites: Node.js 18+, an AI coding agent with hook support (e.g., Claude Code).

npx harkn

The interactive installer will:

  1. Generate a unique ntfy topic
  2. Configure your SSH hostname for click-to-focus
  3. Install the hook into ~/.claude/hooks/
  4. Register it in ~/.claude/settings.json
  5. Send a test notification

Then install the ntfy app on your phone and subscribe to the topic shown during setup.

Usage

Notifications are automatic after install. No changes to your workflow.

# Send a test notification
npx harkn test

# Check installation status
npx harkn status

# Remove hooks and config
npx harkn uninstall

How it works

Claude Code fires hooks on Notification and Stop events. This package installs a hook that:

  1. Reads the JSON payload from stdin
  2. Debounces (max 1 notification per 30s per session)
  3. Focuses the VS Code window via code -r . (using the VSCODE_IPC_HOOK_CLI socket)
  4. Sends a push notification via ntfy.sh (JSON body mode, handles unicode)
  5. Writes {} to stdout and exits

Zero dependencies — pure Node.js built-ins only.

Config

Config lives at ~/.claude-notify.conf (JSON):

{
  "ntfy_enabled": true,
  "ntfy_topic": "claude-myhost-a1b2c3",
  "ntfy_server": "https://ntfy.sh",
  "hostname": "myhost",
  "click_scheme": "vscode",
  "click_mode": "workspace"
}

| Key | Default | Description | |-----|---------|-------------| | ntfy_enabled | true | Send push notifications | | ntfy_topic | (generated) | Your ntfy topic — keep this hard to guess | | ntfy_server | https://ntfy.sh | ntfy server URL (self-hosted supported) | | hostname | OS hostname | SSH hostname for click-to-focus URLs | | click_scheme | vscode | vscode, vscode-insiders, cursor, or none | | click_mode | workspace | workspace (target folder), app (just focus), or none |

Click-to-focus

Tapping a notification opens a vscode://vscode-remote/ssh-remote+host/path URL that focuses the correct VS Code window.

| Mode | Behavior | |------|----------| | workspace | Focuses the VS Code window matching the project folder | | app | Brings VS Code to front (no folder targeting) | | none | No click action (phone-only use) |

Note: The hook also runs code -r . on the server when VSCODE_IPC_HOOK_CLI is present, which directly focuses the correct window via IPC. This works even without ntfy.

Security

  • ntfy topics are public by default. Use a long, random topic name (the installer generates one). Anyone who knows your topic can see your notifications.
  • For sensitive environments, use a self-hosted ntfy server with access control.
  • Session IDs are sanitized to prevent path traversal in debounce file names.
  • The hook never sends code content — only project names and short status messages.

Development

git clone https://github.com/loganrooks/harkn.git
cd harkn

# Run unit tests (62 tests)
npm test

# Run integration tests (requires ntfy.sh access)
npm run test:integration

# Run all tests
npm run test:all

# Deploy to local Claude Code
cp lib/hook.js ~/.claude/hooks/claude-notify.js

License

MIT