The TypeScript SDK for building third-party plugins that run on metatell, a browser-based virtual space platform.
Plugins use this package to access what metatell exposes to the plugin runtime: user information and presence, chat, input, voice, emotes, microphone, camera, screen share, avatar, waypoints, room objects, Spoke triggers, room backgrounds, and metrics.
This package targets the in-browser plugin runtime. It is not an SDK for standalone use on Node.js.
npm install @urth/metatell-sdk
With pnpm:
pnpm add @urth/metatell-sdk
import { getWaypoints } from "@urth/metatell-sdk";
import { onMessage } from "@urth/metatell-sdk/chat";
import { getProfile, getSessionId } from "@urth/metatell-sdk/user";
const waypoints = getWaypoints();
const sessionId = getSessionId();
const displayName = getProfile()?.displayName;
const unsubscribe = onMessage((message) => {
console.log(`${message.from.displayName}: ${message.text}`);
});
console.log({ sessionId, displayName, waypoints });
// on plugin teardown
unsubscribe();
The SDK is distributed as ESM and is meant to run from plugins executing in the browser.
Start with the Overview for runtime requirements, import styles, and the event model.
| Import | Guide |
|---|---|
@urth/metatell-sdk/user |
User Profile, User Movement |
@urth/metatell-sdk/users |
Remote Users |
@urth/metatell-sdk/chat |
Chat |
@urth/metatell-sdk/input |
Input |
@urth/metatell-sdk/voice |
Voice |
@urth/metatell-sdk/emote |
Emote |
@urth/metatell-sdk/objects |
Room Objects (experimental) |
@urth/metatell-sdk/triggers |
Triggers (experimental) |
@urth/metatell-sdk/events |
Events |
@urth/metatell-sdk/auth |
Auth |
@urth/metatell-sdk/lifecycle |
Resource lifecycle |
@urth/metatell-sdk/runtime |
Runtime capabilities |
@urth/metatell-sdk/environment |
Environment backgrounds |
Avatar, user.changeAvatar |
Avatar |
Camera, Mic, Screen |
Media Devices |
metrics |
Metrics |
getWaypoints, warpToWaypoint |
Waypoints |
The full API reference is hosted at sdk.metatell.io/web/.