> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Redis CLI

> CLI commands for Redis state store

# Redis CLI

## Docker Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
docker run -d --name redis \
  -p 6379:6379 \
  redis:7
```

## Quick Start

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Test connection
praisonai persistence doctor \
  --state-backend redis \
  --state-url "redis://localhost:6379"

# Run with state persistence
praisonai persistence run \
  --state-backend redis \
  --state-url "$REDIS_URL" \
  "Hello"
```

## Commands

### Doctor

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai persistence doctor \
  --state-backend redis \
  --state-url "redis://localhost:6379"
```

### Run with State

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai persistence run \
  --state-backend redis \
  --state-url "$REDIS_URL" \
  --session-id my-session \
  "Process this task"
```

## Python Test

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
python3 -c "
from praisonai.persistence import create_state_store
store = create_state_store('redis', url='redis://localhost:6379')
store.set('test', {'value': 1})
print('Redis OK:', store.get('test'))
"
```
