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

@beeper/chat-adapter-matrix

v0.1.0

Published

Matrix adapter for chat

Readme

@beeper/chat-adapter-matrix

Matrix adapter for Chat SDK. Uses Matrix sync (no webhook server required).

If you are using Beeper, you can use Chat SDK with your Beeper Cloud accounts and Matrix chats. This lets you use Chat SDK with WhatsApp, Telegram, Instagram, Signal, X Chat, and more. For bridged chats, we recommend personal usage, since some networks may limit automated activity.

Installation

npm install chat @beeper/chat-adapter-matrix matrix-js-sdk

Usage

import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { createMatrixAdapter } from "@beeper/chat-adapter-matrix";

const bot = new Chat({
  userName: "beeper-bot",
  state: createMemoryState(),
  adapters: {
    matrix: createMatrixAdapter({
      baseURL: process.env.MATRIX_BASE_URL!,
      auth: {
        type: "accessToken",
        accessToken: process.env.MATRIX_ACCESS_TOKEN!,
      },
      recoveryKey: process.env.MATRIX_RECOVERY_KEY,
    }),
  },
});

bot.onNewMention(async (thread, message) => {
  await thread.subscribe();
  await thread.post(`Hi ${message.author.userName}`);
});

Auth

Access token:

auth: { type: "accessToken", accessToken: process.env.MATRIX_ACCESS_TOKEN! };

Username/password:

auth: {
  type: "password",
  username: process.env.MATRIX_USERNAME!,
  password: process.env.MATRIX_PASSWORD!,
};

Environment

Required:

  • MATRIX_BASE_URL
  • Access token mode: MATRIX_ACCESS_TOKEN
  • Password mode: MATRIX_USERNAME, MATRIX_PASSWORD

Optional:

  • MATRIX_USER_ID
  • MATRIX_DEVICE_ID
  • MATRIX_DEVICE_ID_PERSIST_ENABLED
  • MATRIX_DEVICE_ID_PERSIST_KEY
  • MATRIX_RECOVERY_KEY
  • MATRIX_E2EE_ENABLED
  • MATRIX_E2EE_USE_INDEXEDDB
  • MATRIX_E2EE_DB_PREFIX
  • MATRIX_E2EE_STORAGE_PASSWORD
  • MATRIX_E2EE_STORAGE_KEY_BASE64
  • MATRIX_SESSION_ENABLED
  • MATRIX_SESSION_KEY
  • MATRIX_SESSION_TTL_MS
  • MATRIX_SDK_LOG_LEVEL (trace, debug, info, warn, error)

Examples

Copy examples/.env.example to examples/.env, then run:

npm run example:bun

Generate a Beeper access token interactively:

npm run token:bun

Get a Beeper Access Token

Use the interactive helper:

npm run token:bun

It prints:

  • MATRIX_BASE_URL
  • MATRIX_ACCESS_TOKEN
  • MATRIX_USER_ID
  • MATRIX_DEVICE_ID

Paste those values into examples/.env or your deployment secrets.

or:

bun --env-file=examples/.env run examples/bot.ts

Notes

  • handleWebhook() returns 501 by design.
  • Access-token auth resolves identity with whoami.
  • Password auth sends configured device_id during login.
  • Use Redis state in production for stable sessions and device IDs.

License

MIT