A TypeScript implementation of the VTube Studio WebSocket API for Node.js and browser environments. Current stable version is 3.11.0. This library provides a full-featured client for controlling VTube Studio (e.g., face tracking, model manipulation, hotkeys) via its official WebSocket API. It includes automatic reconnection, authentication token persistence, and typed interfaces for all API calls. Key differentiators: platform-agnostic (works in Node and browser), zero runtime dependencies, and comprehensive type definitions shipped with the package. Release cadence is irregular but maintained by a single developer.
npm install vtubestudioNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes an ApiClient with authentication token persistence using browser localStorage, listens for the connect event, and makes a simple API call.
Use try-catch around every API call, and check apiClient.isConnected before making calls.
Remove any calls to `authenticationRequired`. Provide authTokenGetter and authTokenSetter in client options.
Change `apiClient.on('authentication', ...)` to `apiClient.on('authenticate', ...)`.Replace `authToken` with getter/setter functions.
Update event listeners to use new event names (e.g., 'connect', 'disconnect', 'authenticate').
Ensure VTube Studio is open and the WebSocket Plugin is enabled in its settings (Plugins -> WebSocket API -> Enable).
Use `import { ApiClient } from 'vtubestudio'` or the correct CDN URL with `?module`.Wait for the 'authenticate' event to fire before making API calls, or check `apiClient.isAuthenticated`.
No dependency data recorded yet.