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

discorddaemon

v0.1.0

Published

Discord daemon with per-channel hooks. UNIX philosophy for Discord bots.

Readme

discorddaemon (ddd)

Discord daemon with per-channel hooks. UNIX philosophy for Discord bots.

One daemon, many hooks. Each Discord channel routes to its own script. Your hook receives a message on stdin, writes a reply to stdout. That's it.

Requirements

Install

bun install -g discorddaemon

Quick Start

First time? See the Setup Guide for step-by-step instructions from bot creation to channel configuration.

  1. Create a Discord bot at Discord Developer Portal and grab the token.

  2. Scaffold config and hooks:

ddd init    # creates ~/.config/ddd/ddd.toml and hooks/
  1. Edit ~/.config/ddd/ddd.toml:
[bot]
token = "YOUR_BOT_TOKEN"  # or set DDD_TOKEN env var

[channels.general]
id = "CHANNEL_ID_HERE"
on_message = "./hooks/echo.sh"
  1. List available channels (optional):
ddd channels   # shows channel IDs and names as NDJSON
  1. Start the daemon:
ddd start

Hook Interface

Hooks are any executable. Shell scripts, Python, Rust binaries — anything that reads stdin and writes stdout.

Input (stdin)

{
  "id": "message_id",
  "channel_id": "123456",
  "channel_name": "general",
  "author": {
    "id": "user_id",
    "username": "someone",
    "bot": false
  },
  "content": "hello world",
  "timestamp": "2026-03-23T12:00:00.000Z",
  "attachments": []
}

Output (stdout)

Plain text. If non-empty, sent as a reply. If empty, nothing happens.

Exit codes

  • 0 — success
  • non-zero — error logged to stderr

Timeout

30 seconds by default.

Example Hook

#!/usr/bin/env bash
# echo.sh — echoes back the message content
jq -r '.content' | sed 's/^/echo: /'

Design Philosophy

  • One tool, one job. ddd connects to Discord. Your hooks do everything else.
  • Text streams as interface. stdin JSON in, stdout text out. Composable with any language.
  • No framework lock-in. Hooks are processes, not plugins. Swap them without restarting.

License

MIT