rivetkit-client-swift

Installation
Summary

Swift client for connecting to Rivet Actors with stateless and stateful connection modes.

  • Supports both stateless action calls and persistent WebSocket connections with real-time event streaming via AsyncStream
  • Provides typed action calls with 0–5 positional arguments, plus raw JSON fallback for larger argument counts
  • Includes connection lifecycle monitoring through status changes, errors, opens, and closes streams
  • Supports low-level HTTP and WebSocket access for custom onRequest and onWebSocket handlers
  • Requires explicit endpoint configuration; reads optional namespace and token from environment variables or URL auth syntax
SKILL.md

RivetKit Swift Client

Use this skill when building Swift clients that connect to Rivet Actors with RivetKitClient.

Version

RivetKit version: 2.3.0-rc.5

Error Handling Policy

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

Install

Add the Swift package dependency and import RivetKitClient:

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