A modern, type-safe Effect-TS wrapper for the official `redis` (node-redis) client (v5). Version 0.0.32 — currently pre-1.0 with frequent breaking changes. Key differentiators: resource-safe connection lifecycle via Scope and Layer.scoped, modular services (Core, Pub/Sub, Streams), shared connection across services, tagged error union (RedisConnectionError, RedisCommandError, RedisGeneralError), and a raw escape hatch via use(). Built for Effect-TS ecosystem; requires TypeScript 5+. Release cadence: weekly releases with breaking changes common.
npm install effect-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to connect to Redis, set/get keys, increment a counter, and use pub/sub with Effect-TS layers.
Pin to exact version and test upgrades carefully.
Avoid relying on raw client if possible; prefer Effect-Redis services.
Use RedisPubSub service for pub/sub operations; do not mix with core Redis service on the same client.
Always provide RedisConnectionOptionsLive as the first layer.
Use Effect.catchTags to handle specific error types.
Install effect: npm install effect
Use the correct named import: import { Redis } from 'effect-redis' (Redis is a service tag, not a constructor).Use Effect.provide(layer) or Effect.runPromise(program.pipe(Effect.provide(layer)))
Ensure RedisConnectionOptionsLive and RedisLive (or RedisPubSubLive/RedisStreamLive) are composed into a layer and provided to the Effect.