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

strfry-rpc

v0.0.1

Published

I was looking for some way to remotely control my strfry relay to issue `sync` and `scan` commands for example from another docker container so I cooked this up.

Readme

Strfry RPC

I was looking for some way to remotely control my strfry relay to issue sync and scan commands for example from another docker container so I cooked this up.

The server.c program creates a UNIX socket that listens for commands

When it reads some input on the socket it treats the first word as the name of another socket file to be used for sending the command output. The remaining input is eval'd.

Build and run the server

gcc -o server server.c && ./server

Pipe an expression to the socket

{ nc -lU result & pid=$!; echo "result expr 3 + 4" | nc -U rpc; wait $pid; } 2> /dev/null
7

I've included a client program in typescript that you can run with Bun

import { scan } from "./strfry.ts";

let result = await scan({ kinds: [1] })
console.log(result)

Run it

bun demo.ts

Output

[
  {
    content: "good morning",
    created_at: 1728073424,
    id: "da786d3bdefd2e2e27b466f8586fd30b4d1a0b49bc18d45ca392fd93d926ecb0",
    kind: 1,
    pubkey: "c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5",
    sig: "c586d58af974a4624d216f820c20c6934a65c59c076ba3fd09bd097dd38f39678040503034c9cac32930062620311de2ec635bc01c04e55feea171bce966afb7",
    tags: [
      [ "t", "gm" ]
    ],
  }
]

It assumes that strfry is in your PATH and that strfry-db exists in the current folder and has some kind 1 events to query.

In the context of a docker network you can mount a shared volume that the server creates socket files in so the strfry container and the container your client runs in can both access the sockets.