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

@mulmobridge/nostr

v0.1.1

Published

Nostr bridge for MulmoBridge — encrypted DMs over any Nostr relay

Readme

@mulmobridge/nostr

Experimental — please test and report issues.

Nostr encrypted-DM bridge for MulmoClaude. Connects to any list of Nostr relays over WebSocket, handles NIP-04 encrypted direct messages, and replies as a signed kind=4 event. Outbound-only — no public URL needed.

Setup

1. Generate a bot key

A brand-new Nostr identity is just a secret key. One-liner:

node -e "const { generateSecretKey, getPublicKey, nip19 } = require('nostr-tools'); const sk = generateSecretKey(); console.log('NOSTR_PRIVATE_KEY=' + Buffer.from(sk).toString('hex')); console.log('npub: ' + nip19.npubEncode(getPublicKey(sk)));"

Or use any Nostr client (Damus / Amethyst / Iris / Primal) to register and export the secret key (nsec1…).

2. Pick relays

Public, free relays that accept everyone:

  • wss://relay.damus.io
  • wss://nos.lol
  • wss://relay.snort.social
  • wss://nostr.wine
  • wss://relay.nostr.band

Start with 2–3. More relays = better reach but more network traffic.

3. Run the bridge

NOSTR_PRIVATE_KEY=your-hex-or-nsec \
NOSTR_RELAYS=wss://relay.damus.io,wss://nos.lol \
npx @mulmobridge/nostr

Send a Nostr DM to the bot's npub from any Nostr client — you'll get a reply.

Environment variables

| Variable | Required | Default | Description | |--------------------------|----------|---------|-------------| | NOSTR_PRIVATE_KEY | yes | — | 64-char hex or nsec1… bech32 bot secret key | | NOSTR_RELAYS | yes | — | CSV of wss:// relay URLs | | NOSTR_ALLOWED_PUBKEYS | no | (all) | CSV of hex pubkeys allowed to DM the bot (lower-case). Empty = everyone | | NOSTR_CURSOR_FILE | no | ~/.mulmoclaude/nostr-cursor.json | Path for the persisted last-seen event timestamp. Set to an absolute path if you run multiple bots on the same machine | | MULMOCLAUDE_AUTH_TOKEN | no | auto | MulmoClaude bearer token override | | MULMOCLAUDE_API_URL | no | http://localhost:3001 | MulmoClaude server URL |

How it works

  1. Bridge derives the bot's pubkey from the secret key and opens WebSocket subscriptions to every relay in NOSTR_RELAYS.
  2. Filter: kinds=[4] + #p=<botPubkey> + since=<cursor>. The cursor is the created_at of the last event we've committed to processing, persisted to NOSTR_CURSOR_FILE so restarts don't lose DMs delivered while the bridge was offline. On cold start (no cursor file) we fall back to now-60s to avoid replaying ancient history.
  3. Every 5 minutes we reopen the subscription on every relay. nostr-tools' SimplePool does not auto-resume subscriptions when a relay drops the WebSocket, so without this we would silently stop receiving after the first relay hiccup. Duplicate deliveries across the reopen boundary are filtered by event-id dedup.
  4. For each inbound event, we verify (nostr-tools does it), decrypt with NIP-04 ECDH + AES-CBC, check the sender against the allowlist, and forward the plaintext to MulmoClaude keyed by sender pubkey (hex).
  5. Replies are encrypted back with the sender's pubkey, signed as a fresh kind=4 event, and broadcast to all relays. Any relay accepting it = successful delivery (clients will see the message).

Troubleshooting

| Symptom | Cause | Fix | |---|---|---| | No events delivered | Your relays don't replicate inbound kind=4 events | Add a high-availability relay like wss://relay.damus.io | | Decrypt failed | Sender used NIP-44 (newer spec) or non-standard encryption | NIP-44 support is deferred to v0.2 — for now tell the user to send via a NIP-04-compatible client | | Reply never shows up in the sender's client | All your relays rejected the event (spam filter / rate-limit) | Add more relays; most clients read from many in parallel |

Security notes

  • The secret key is the bot's entire identity. Store it in a secret manager (not plain env / shell history).
  • Nostr relays see the ciphertext of every DM — the plaintext is only readable by the sender and recipient. Metadata (who talks to whom, when, how much) is public.
  • NIP-04 is the legacy standard. NIP-44 is newer with better cryptography but isn't universally deployed yet. This bridge does NIP-04 only in v0.1.0.
  • Without NOSTR_ALLOWED_PUBKEYS, any Nostr user who DMs the bot pubkey can converse with your MulmoClaude. Use allowlisting for personal agents.
  • The bot will also see its own echoes if relays replay events — we filter on evt.pubkey === ourPubkey so they're ignored.

Ecosystem

Part of the @mulmobridge/* package family.

Shared libraries:

Bridges (one npm package per platform):