API Reference

ReMOAT SDK API Reference

Complete method specifications and TypeScript interface definitions for the ReMOAT SDK.

ADVERTISEMENT

ReMOAT.init(config) / init(config)

Configures and activates the ReMOAT client SDK. All UI switches and telemetry toggles default to <code>true</code> if not explicitly provided.

TypeScript Interface
TYPESCRIPT
export interface RemoatConfig {
  /** Workspace API Key (Required) */
  apiKey: string;
  /** UI presentation mode: 'floating' pill widget, 'hidden' (no UI), or 'custom' */
  mode?: 'floating' | 'hidden' | 'custom';
  /** Selectors for DOM elements whose inputs/text should be masked or blocked */
  redactSelectors?: string[];
  /** Redact sensitive HTTP request/response headers (Authorization, Cookie, etc.). Defaults to true. */
  redactHeaders?: boolean;
  /** Environment tag: 'production' | 'staging' | 'development' */
  environment?: 'production' | 'staging' | 'development' | string;
  /** 1-Click pairing auto-discovery (Default: true) */
  autoPair?: boolean;
  /** Auto start connection on load (Default: true) */
  autoConnect?: boolean;
  /** Show floating QA overlay widget (Default: true unless mode is hidden/custom) */
  showOverlay?: boolean;
  /** Mask sensitive password & payment inputs (Default: true) */
  maskInput?: boolean;
  /** Permit interactive remote mouse & click control (Default: true) */
  allowControl?: boolean;
  /** Live rrweb DOM mutation recording (Default: true) */
  captureDom?: boolean;
  /** Console logs & bidirectional REPL evaluation (Default: true) */
  captureConsole?: boolean;
  /** Network fetch / XHR telemetry streaming (Default: true) */
  captureNetwork?: boolean;
  /** LocalStorage & cookie inspector (Default: true) */
  captureStorage?: boolean;
  /** Persist 6-digit pairing PIN across refreshes (Default: true) */
  persistPin?: boolean;
  /** Active screen sharing glowing border indicator (Default: false) */
  remoteViewingGlow?: boolean;
  /** Custom backend signaling URL override */
  apiUrl?: string;
}
Production Setup
JAVASCRIPT
import ReMOAT from '@remoat.dev/sdk';

// Initialize ReMOAT in your root client entry
ReMOAT.init({
  apiKey: process.env.NEXT_PUBLIC_REMOAT_KEY,
  mode: 'floating', // 'floating' pill, 'hidden', or 'custom'
  redactSelectors: ['.credit-card-input', '[data-sensitive="true"]'],
  redactHeaders: true,
});

Configuration Options (RemoatConfig)

| Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | apiKey | string | Required | Workspace API key (e.g. tpk_production_live). | | environment | string | 'production' | Environment tag ('production', 'staging', 'development'). | | autoPair | boolean | true | Broadcasts waiting PIN to Developer Portal for 1-click auto-discovery. | | autoConnect | boolean | true | Auto starts P2P signaling when debugging mode is active. | | showOverlay | boolean | true | Mounts floating QA pairing overlay and voice call HUD in the browser. | | maskInput | boolean | true | Automatically masks sensitive input fields (passwords, PINs, card numbers). | | allowControl | boolean | true | Permits remote developer to click and interact with live elements. | | captureDom | boolean | true | Enables real-time rrweb DOM streaming. | | captureConsole | boolean | true | Enables console interception and bidirectional REPL eval. | | captureNetwork | boolean | true | Enables fetch and XMLHttpRequest network inspection. | | captureStorage | boolean | true | Enables live LocalStorage, SessionStorage, and Cookie inspection. | | persistPin | boolean | true | Retains the 6-digit session PIN in localStorage across tab refreshes. | | remoteViewingGlow | boolean | false | Enables full-screen glowing border indicator when session is actively inspected. | | apiUrl | string | auto | Custom backend signaling URL override. |

Session Control Methods

Programmatically trigger or terminate debugging sessions in your application:

Async/Await
JAVASCRIPT
// Start a session and retrieve the 6-digit PIN
const pin = await ReMOAT.startSession();
console.log('Pairing PIN:', pin);

// Check if currently connected to a remote developer
const isConnected = ReMOAT.isConnected();

// Stop active session and close WebRTC peer connection
ReMOAT.endSession();
Event Handlers
JAVASCRIPT
// Listen to session lifecycle events
ReMOAT.on('connected', (session) => {
  console.log('Session established with ID:', session.id);
});

ReMOAT.on('disconnected', () => {
  console.log('Remote debugging ended.');
});
ADVERTISEMENT

🚀 Deploy ReMOAT in your project in under 60 seconds

Install @remoat.dev/sdk with zero server storage and sub-10ms WebRTC P2P DevTools streaming.

Launch Developer Console →
ADVERTISEMENT