Registry / database / redis-modules-sdk

redis-modules-sdk

JSON →
library1.4.0jsnpmunverified

An open-source TypeScript SDK that provides a unified interface for connecting to Redis and executing commands across multiple Redis modules including ReJSON, RedisTimeSeries, RediSearch, RedisGraph, RedisGears, RedisBloom, RedisAI, and RedisIntervalSets. Version 1.4.0, released on an as-needed basis with full TypeScript type definitions. It differentiates itself by being an all-in-one solution covering all major Redis modules in a single package, with strong typing and easy-to-find command references.

npm install redis-modules-sdk
INSTALL
IMPORT
SIG · REDIS-MODULES-SDK
R
redis-modules-sdk
databasejavascriptv1.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Redis
import { Redis } from 'redis-modules-sdk'
import Redis from 'redis-modules-sdk'
Named export, not default.

Connects to Redis, sets a JSON document using ReJSON module, and disconnects.

import { Redis } from 'redis-modules-sdk'; async function main() { const client = new Redis({ host: process.env.REDIS_HOST ?? 'localhost', port: parseInt(process.env.REDIS_PORT ?? '6379'), }); await client.connect(); // Example: using ReJSON module const result = await client.json_set('doc', '$', { hello: 'world' }); console.log('JSON set result:', result); await client.disconnect(); } main().catch(console.error);
Debug
Known issues
gotchaThe SDK requires the 'redis' package as a peer dependency. Ensure both are installed.
fix
npm install redis redis-modules-sdk
affects: *
gotchaThe SDK uses named exports only. Using default import will result in undefined at runtime.
fix
Use import { Redis } from 'redis-modules-sdk'
affects: *
gotchaSome Redis module commands may not be fully implemented or tested. Check the documentation for specific command support.
fix
Review the GitHub issues or contribute missing commands
affects: <=1.4.0
Errors
Common errors & fixes
Error: Cannot find module 'redis-modules-sdk'
Package not installed or typo in import.
fix
Run: npm install redis-modules-sdk
TypeError: redis_1.Redis is not a constructor
Using default import instead of named import.
fix
Change to: import { Redis } from 'redis-modules-sdk'
Upgrade
Version history
1.4.0latest on npm
Audit
Dependencies
redisrequiredUnderlying Redis client for connection and commands
Agent activity
20 hits · last 30 days
node
16
Meta
1
Amazon
1
Resources
redis-modules-sdk — npm install redis-modules-sdk · libregistry