# Alepha - Redis

## Installation

Part of the `alepha` package. Import from `alepha/redis`.

```bash
npm install alepha
```

## Overview

Redis client wrapper.

**Features:**

- Single managed client connection with automatic reconnection
- Pub/sub support
- Node and Bun client implementations

## API Reference

### Providers

- [`BunRedisProvider`](https://latest.alepha.dev/docs/reference-providers-bunredisprovider.md) - Bun Redis client provider using Bun's native Redis client.
- [`BunRedisSubscriberProvider`](https://latest.alepha.dev/docs/reference-providers-bunredissubscriberprovider.md) - Bun Redis subscriber provider for pub/sub operations.
- [`NodeRedisProvider`](https://latest.alepha.dev/docs/reference-providers-noderedisprovider.md) - Node.js Redis client provider using `@redis/client`.
- [`NodeRedisSubscriberProvider`](https://latest.alepha.dev/docs/reference-providers-noderedissubscriberprovider.md) - Node.js Redis subscriber provider using `@redis/client`.
- [`RedisProvider`](https://latest.alepha.dev/docs/reference-providers-redisprovider.md) - Abstract Redis provider interface.
- [`RedisSubscriberProvider`](https://latest.alepha.dev/docs/reference-providers-redissubscriberprovider.md) - Abstract Redis subscriber provider interface.

### Environment Variables

Environment variables used to configure this module. These can be set in your `.env` file or through your deployment configuration.

| Variable    | Type | Default      | Description                                                                               |
| ----------- | ---- | ------------ | ----------------------------------------------------------------------------------------- |
| `REDIS_URL` | text | **Required** | Redis connection URL. Setting it turns Redis on for cache, queue, topic, lock and actors. |
