Skip to content

Getting Started

threadiverse is a unified typescript client for threadiverse instances — Lemmy and PieFed, with Mbin unsupported so far. You write against one API; the client detects the instance's software and translates.

Installation

sh
pnpm i threadiverse
sh
npm i threadiverse
sh
yarn add threadiverse

Usage

The package exports one main class, ThreadiverseClient:

ts
import { ThreadiverseClient } from "threadiverse";

const client = new ThreadiverseClient("https://lemmy.world");

const { data: posts } = await client.getPosts();

The first API call resolves the instance's software via .well-known/nodeinfo and selects the matching provider.

Method names and payload shapes follow lemmy-js-client's LemmyHttp, so for existing Lemmy apps it is mostly a drop-in replacement.

Software support

SoftwareStatus
Lemmy v0✅ Supported
Lemmy v1⚠️ In development
PieFed⚠️ Partial, experimental
Mbin❌ No support yet (PRs welcome!)

Behavior guarantees

Next steps