Intimate hardware control for modern JavaScript
A TypeScript client for the Buttplug Intimacy Protocol. Connect to devices, send commands, read sensors, and play patterns — with full type safety and good vibrations.
$ bun add @zendrex/buttplug.jsimport { ButtplugClient } from "@zendrex/buttplug.js";
const client = new ButtplugClient("ws://localhost:12345");
client.on("deviceAdded", ({ device }) => {
// Good vibrations
device.vibrate(0.5);
});
await client.connect();
await client.startScanning();Pleasure, engineered
Everything you need to build intimate applications with confidence.
Protocol v4
10 output types and 5 sensor inputs — vibration, rotation, position, oscillation, constriction, and more.
Type-safe API
Full TypeScript types with Zod schema validation for autocomplete and compile-time safety.
Pattern Engine
Keyframe-based pattern playback with built-in presets, custom tracks, easing curves, and loop control.
Auto-reconnect
Configurable reconnection with exponential backoff, attempt limits, and lifecycle events.
Runtime Agnostic
Works in any JavaScript runtime with WebSocket support — Node.js, Bun, Deno, and browsers.
Device Control
High-level API for device discovery, output commands, and sensor reads across all device types.
Ready to turn things on?
Follow the getting started guide to connect to your first device in minutes.