upstash-redis-js

Access Upstash Redis over HTTP with automatic serialization in JavaScript.

17|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/upstash/skills --skill upstash-redis-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upstash-redis-js
Source: https://github.com/upstash/skills/tree/main/skills/upstash-redis-js
Command: npx skills add https://github.com/upstash/skills --skill upstash-redis-js

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designed to simplify serverless Redis usage by providing automatic serialization and type-safe access over HTTP with the Upstash Redis SDK.

Core Features & Use Cases

  • Automatic type preservation across get/set operations for common JavaScript types (numbers, strings, objects, arrays)
  • Comprehensive Redis data structures support (strings, hashes, lists, sets, sorted sets, JSON, streams)
  • Serverless-friendly REST access with environment-based credentials
  • Optional adapters for Redis Search and TCP-based clients to expand interoperability

Quick Start

Install the @upstash/redis package and initialize Redis.fromEnv() to begin using the SDK in your serverless app.

Frequently Asked Questions about upstash-redis-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Redis in a serverless environment without managing TCP connections?

You can use an HTTP-based serverless Redis SDK to access Redis over REST. This approach avoids persistent TCP connections, making it ideal for edge environments and serverless functions by relying on stateless HTTP requests.

What is the best way to maintain type safety when caching JavaScript objects in Redis?

Using a typed serverless Redis SDK provides automatic type preservation and data serialization for common JavaScript types during get and set operations. This eliminates manual JSON parsing and ensures type-safe access across your application.

Does the Upstash Redis SDK support advanced data structures like sorted sets and streams?

Yes, the Upstash Redis SDK supports comprehensive Redis data structures including strings, hashes, lists, sets, sorted sets, JSON, and streams. This allows you to handle leaderboards, sessions, and complex caching use cases effectively.

Can I use Redis search capabilities with a serverless HTTP client?

Yes, you can use optional adapters with the serverless Redis SDK to expand interoperability and enable Redis Search. These adapters allow your HTTP-based client to perform advanced search operations across your stored data.

What credentials do I need to configure Redis for edge environments?

You need a REST URL and token credentials to configure serverless Redis access. You can initialize the connection easily in your application by using environment-based credentials, allowing seamless integration into edge platforms.