Skip to main content
Bun includes a built-in Redis (and Valkey) client that provides a fast, promise-based API for interacting with Redis servers.

Quick Start

Creating a Client

Default Connection

Custom URL

With Options

With TLS

Connection Management

Connect

Close

Connection Status

String Commands

GET and SET

SET with Options

Increment/Decrement

Other String Commands

Key Commands

Existence and Deletion

Expiration

Other Key Commands

Hash Commands

List Commands

Set Commands

Sorted Set Commands

Pub/Sub

Transactions

Use pipelining for atomic operations:

Raw Commands

Type Signatures