RespClient is a minimal RESP(REdis Serialization Protocol) client for C# and PowerShell.
C# PowerShell Shell
Latest commit 3eb22d5 Apr 9, 2015 @guitarrapc guitarrapc Merge pull request #25 from guitarrapc/master
Release 1.1.13

Build status


RespClient is a minimal RESP(REdis Serialization Protocol) client for C# and PowerShell.

What's the diferrence between other .NET Redis Client

.NET has several Redis Client, BookSleeve (and it's wrapper CloudStructures), ServiceStack.Redis, etc. There are heavy for command line usage. RespClient is focusing on simple command usage like Redis-Cli. It's higher match for PowerShell.


Binary is registered at NuGet, RespClient.

# Standalone PowerShell Cmdlet and .NET Client, requires System.Management.Automation
PM> Install-Package RespClient

PowerShell Cmdlet

# Module is provided by dll 
Import-Module RespClient.dll

# Connect to RedisServer. Connection is effective during powershell session.
# other parameter, -Host, -Port, -Timeout

# Send Command to RedisServer. Return value was decoded UTF8 string.
Send-RedisCommand "set test abcde"

# Support pipeline mode.
Send-RedisCommand "set test fghijk"
Send-RedisCommand "incr testb"
Send-RedisCommand "incr testc"
Send-RedisCommand "get test"

# Cleanup Connection explicitly 


If use raw RespClient, you can send binary value and choose other decoder(besides Encoding.UTF8).

using (var client = new Redis.Protocol.RespClient())
    // string command
    client.SendCommand("set a 100", Encoding.UTF8.GetString);

    // binary safe command
    client.SendCommand("set", new[] { Encoding.UTF8.GetBytes("test"), Encoding.UTF8.GetBytes("abcde") }, Encoding.UTF8.GetString);

    // use pipeline
    var results = client.UsePipeline()
        .QueueCommand("incr a")
        .QueueCommand("incrby b 10")
        .QueueCommand("get a", Encoding.UTF8.GetString)
} // disconnect on dispose