rivetkit-client-javascript

Installation
Summary

JavaScript client for connecting to Rivet Actors with stateless or stateful connections.

  • Supports browser, Node.js, and Bun environments with automatic endpoint detection via environment variables or explicit configuration
  • Offers two interaction modes: stateless action calls for independent requests and stateful connections with real-time event subscriptions
  • Includes low-level HTTP and WebSocket access for actors implementing onRequest or onWebSocket handlers
  • Provides compound array-based keys for hierarchical actor addressing and built-in error handling via ActorError with code and metadata inspection
SKILL.md

RivetKit JavaScript Client

Use this skill when building JavaScript clients (browser, Node.js, or Bun) that connect to Rivet Actors with rivetkit/client.

First Steps

  1. Install the client (latest: 2.3.0-rc.5)
    npm install rivetkit@2.3.0-rc.5
    
  2. Create a client with createClient() and call actor actions.

Error Handling Policy

  • Prefer fail-fast behavior by default.
  • Avoid try/catch unless absolutely needed.
  • If a catch is used, handle the error explicitly, at minimum by logging it.

Getting Started

Related skills
Installs
5.5K
GitHub Stars
14
First Seen
Jan 26, 2026