upstash-redis

star 0

Upstash Redis integration for serverless caching and data storage. Use when implementing Redis caching, rate limiting, or session storage with Upstash.

rand-tech By rand-tech schedule Updated 1/30/2026

name: upstash-redis description: Upstash Redis integration for serverless caching and data storage. Use when implementing Redis caching, rate limiting, or session storage with Upstash.

Upstash Redis Integration

Upstash provides serverless Redis.

Guidelines

  • Use the @upstash/redis package to interact with Upstash Redis.
  • The integration uses the KV_REST_API_URL and KV_REST_API_TOKEN environment variables.

Environment Variables

  • KV_REST_API_URL - Upstash Redis REST API URL
  • KV_REST_API_TOKEN - Upstash Redis REST API token

Example Usage

import { Redis } from '@upstash/redis'

const redis = new Redis({
  url: process.env.KV_REST_API_URL,
  token: process.env.KV_REST_API_TOKEN,
})

// Set a value
await redis.set('key', 'value')

// Get a value
const value = await redis.get('key')

// Set with expiration (seconds)
await redis.set('session', sessionData, { ex: 3600 })

// Increment
await redis.incr('counter')
Install via CLI
npx skills add https://github.com/rand-tech/v0-skills --skill upstash-redis
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator