# xmpp-ts **Repository Path**: mirrors_codejamninja/xmpp-ts ## Basic Information - **Project Name**: xmpp-ts - **Description**: cross platform typescript library for xmpp built on xmpp.js - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-09-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # xmpp-ts > cross platform typescript library for xmpp built on xmpp.js ![](assets/xmpp-ts.png) Small, focused clients for the core xmpp building blocks, layered on top of [xmpp.js](https://github.com/xmppjs/xmpp.js). Each concern ships as its own package so applications only pull in what they use. | package | description | | ---------------------------------------- | --------------------------------------- | | [`@xmpp-ts/error`](packages/error) | typed rfc6120 stanza errors | | [`@xmpp-ts/jid`](packages/jid) | jid with friendly string parsing | | [`@xmpp-ts/message`](packages/message) | chat messages | | [`@xmpp-ts/presence`](packages/presence) | presence and subscriptions | | [`@xmpp-ts/roster`](packages/roster) | roster management and pushes | | [`@xmpp-ts/types`](packages/types) | shared types and `@xmpp/events` runtime | | [`@xmpp-ts/vcard`](packages/vcard) | vcard-temp profiles | ## Usage ```ts import Jid from "@xmpp-ts/jid"; import MessageClient from "@xmpp-ts/message"; import PresenceClient from "@xmpp-ts/presence"; import RosterClient from "@xmpp-ts/roster"; import { client } from "@xmpp/client"; const xmpp = client({ service: "xmpp://localhost:5222", domain: "localhost", username: "alice", password: "alicepass", }); const messageClient = new MessageClient(xmpp); const presenceClient = new PresenceClient(xmpp); const rosterClient = new RosterClient(xmpp); messageClient.on("message", (message) => { console.log(`${message.from.toString()}: ${message.body}`); }); await xmpp.start(); await presenceClient.available(); await rosterClient.get(); await messageClient.send({ to: new Jid("bob@localhost"), body: "hello" }); ``` ## Versioning - Requires **node >= 20.10** and the **xmpp.js 0.14** line, which is [esm only](https://github.com/xmppjs/xmpp.js) — these packages are esm only as well. - xmpp.js still ships no type definitions; types come from the official `@types/xmpp__*` packages, which replaced the ambient declarations this repo used to maintain. ## Development ```sh make prepare # one time machine setup (asdf toolchain + pnpm install) make build # build all packages make test # unit tests + integration tests (integration needs docker) make lint # oxfmt --check + oxlint make format # oxfmt ``` Integration tests spin up a throwaway [prosody](https://prosody.im) server with docker compose, exercise connect, roster, message round-trip, presence subscriptions and vcards against it, then tear it down. Use `KEEP_STACK=1 make test/integration` to leave the server running. ## License [Apache-2.0](LICENSE) © [Clay Risser](https://clayrisser.com) (individual packages are [MIT](packages/jid/LICENSE) licensed)