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

pingsystem

v0.0.2

Published

Native Windows background agent in Go to monitor system events and dispatch Telegram notifications

Readme

PingSystem (Go Edition)

CI License: Apache 2.0 Go Version

PingSystem is a lightweight, production-ready, native Windows background agent written entirely in Go. It monitors system power and session events and dispatches notifications to Telegram via the Telegram Bot API.

It compiles into a single standalone executable (PingSystem.exe) with no runtime dependencies (no Node.js, no Python, no PowerShell polling).


Features (v1)

  • 🚀 Windows Startup / User Login Notification
  • 🌙 Windows Sleep Notification (WM_POWERBROADCAST -> PBT_APMSUSPEND)
  • ☀️ Windows Wake Notification (WM_POWERBROADCAST -> PBT_APMRESUMEAUTOMATIC / PBT_APMRESUMESUSPEND)
  • 🔒 Windows Lock Notification (WM_WTSSESSION_CHANGE -> WTS_SESSION_LOCK, e.g. Win + L)
  • 🔓 Windows Unlock Notification (WM_WTSSESSION_CHANGE -> WTS_SESSION_UNLOCK)
  • 🛑 Windows Shutdown Notification (WM_QUERYENDSESSION / WM_ENDSESSION - best effort)
  • ⚙️ Autostart Helper Flags: Simple command-line flags to enable/disable Windows registry autostart (HKCU\Software\Microsoft\Windows\CurrentVersion\Run).
  • 📁 Daily Logging: Automatically maintains log files in %APPDATA%\PingSystem\logs\YYYY-MM-DD.log.
  • 📦 Single Binary Output: Compiles into PingSystem.exe (~6MB background process).

Configuration

Configuration is automatically generated on first launch at:

%APPDATA%\PingSystem\config.json

Example config.json:

{
    "botToken": "YOUR_TELEGRAM_BOT_TOKEN",
    "chatId": "YOUR_TELEGRAM_CHAT_ID",
    "deviceAlias": "My Laptop"
}

Fields

  • botToken: Your Telegram Bot API token from @BotFather.
  • chatId: Your Telegram User or Group Chat ID.
  • deviceAlias: A custom friendly alias for the device (e.g. "Workstation 01").

CLI Options

Usage of PingSystem.exe:
  -install
    	Enable Windows registry autostart
  -uninstall
    	Disable Windows registry autostart
  -status
    	Check autostart and configuration status
  -version
    	Display application version

Telegram Notification Format

Each event sends a Telegram message formatted as follows:

🚀 PingSystem Event: Startup / User Login

Device Alias: My Laptop
Username: Sudhu
Timestamp: 2026-08-05 10:30:00 PM MST

Building from Source

Requirements

  • Go 1.26+ installed

Build Binary (Cross-compile on macOS / Linux)

./build.sh

Or manually:

GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o PingSystem.exe .

Build Binary (On Windows)

build.bat

Directory Structure

.
├── main.go                       # Main entry point & CLI parser
├── go.mod                        # Go module definition
├── go.sum                        # Go module checksums
├── build.sh                      # Shell script to cross-compile for Windows
├── build.bat                     # Windows batch build script
├── LICENSE                       # Apache-2.0 Open Source License
├── CONTRIBUTING.md               # Contribution guidelines & Changeset setup
├── CODE_OF_CONDUCT.md            # Contributor Covenant Code of Conduct
├── SECURITY.md                   # Security vulnerability reporting policy
├── .changeset/                   # Versioning and release management configuration
├── .github/                      # Issue/PR templates & GitHub Actions CI/Release workflows
└── internal/
    ├── autostart/                # Registry autostart management (Enable, Disable, IsEnabled)
    ├── config/                   # Config loader & auto-creator (%APPDATA%\PingSystem\config.json)
    ├── logger/                   # Daily file logging (%APPDATA%\PingSystem\logs\)
    ├── sysinfo/                  # Native OS metadata (hostname, user, Windows build version)
    ├── telegram/                 # Telegram Bot API notification client
    └── watcher/                  # Win32 hidden message window event loop (WM_POWERBROADCAST, etc.)

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md to get started with setup, coding guidelines, and submitting changesets.

Please also adhere to our Code of Conduct.


🔒 Security

If you discover a security vulnerability, please refer to our Security Policy for instructions on how to report it confidentially.


📄 License

This project is licensed under the Apache License 2.0 (Apache-2.0) - see the LICENSE file for details.