Skip to main content


Build Status license

An experimental implementation of redis client for deno


needs --allow-net privilege

Stateless Commands

import { connect } from "";
const redis = await connect({
  hostname: "",
  port: 6379
const ok = await redis.set("hoge", "fuga");
const fuga = await redis.get("hoge");


const sub = await redis.subscribe("channel");
(async function() {
  for await (const { channel, message } of sub.receive()) {
    // on message

Advanced Usage

Execute raw commands

redis.executor is raw level redis protocol executor. You can send raw redis commands and receive replies.

await redis.executor.exec("SET", "redis", "nice"); // => ["status", "OK"]
await redis.executor.exec("GET", "redis"); // => ["bulk", "nice"]


const redis = await connect({
  hostname: "",
  port: 6379
const pl = redis.pipeline();;;
pl.set("set1", "value1");
pl.set("set2", "value2");
pl.mget("set1", "set2");
const replies = await pl.flush();

TxPipeline (pipeline with MULTI/EXEC)

We recommend to use tx() instead of multi()/exec() for transactional operation.
MULTI/EXEC are potentially stateful operation so that operation’s atomicity is guaranteed but redis’s state may change between MULTI and EXEC.

WATCH is designed for these problems. You can ignore it by using TxPipeline because pipelined MULTI/EXEC commands are strictly executed in order at the time and no changes will happen during execution.

See detail

const tx = redis.tx();
tx.set("a", "aa");
tx.set("b", "bb");
await tx.flush();
// SET a aa
// SET b bb
// DEL c

unimplmeneted features (5.0.3)

There are still unimplmeneted API