Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Effect KitRedis

Entry points

Look up every export of the root, node, bun and upstash entry points of the Redis package.

@effect-kit/redis has four entry points. The package is ESM only and its exports map has a types and a default condition for each. Import the root for services and types, then one runtime entry point for the layer.

Entry pointImportUse
.@effect-kit/redisServices, commands, errors and types. Runtime neutral, with no transport.
./node@effect-kit/redis/nodeRedisNode layers over node:net and node:tls.
./bun@effect-kit/redis/bunRedisBun layers over Bun.connect.
./upstash@effect-kit/redis/upstashRedisUpstash layers over Effect HTTP, with SSE events.

Pick one runtime entry point. See Runtimes.

@effect-kit/redis

Services

Each service is a Context.Service class.

ExportKindPurpose
RedisServiceOrdinary commands, pipeline, transaction, execute, executePrepared, raw and scans.
RedisSessionsServiceLeased sessions, withSession, withBlockingSession, watch and blocking commands.
RedisStreamsServiceContinuous stream readers, group consumers and recovery.
RedisScriptsServiceRuns a RedisScript by digest and loads it on demand.
RedisAdminServiceServer, ACL, config, client and diagnostics commands.
RedisPubSubServicesubscribe, psubscribe and ssubscribe.
RedisTrackingServiceClient-side caching invalidation stream. Not in the default layer.
RedisCacheServiceBounded GET cache over RedisTracking. Not in the default layer.
RedisSearchServiceaggregate cursor stream with an owned lease. Needs RedisSessions.
RedisMonitorServiceMONITOR event stream.
RedisShutdownServiceSHUTDOWN.
RedisClusterServiceCluster client. Provided by layerCluster on a runtime entry point.
RedisSentinelServiceSentinel client. Provided by layerSentinel on a runtime entry point.
RedisCredentialsServiceCredential refresh with rotate, get, invalidate, revision and snapshot.
RedisSentinelCredentialsServiceCredentials for the Sentinel plane.
CommandExecutorServiceRuns a Command. The seam under Redis.
BatchExecutorServiceRuns a batch of commands for pipelines and transactions.
ConnectionServiceThe ordinary connection: executeOrdinary, takePush, snapshot, close and abort.
TransportServiceOpens a socket. The runtime entry points provide it.

Namespaces

ExportKindPurpose
CommandsNamespaceEvery command as a pure Command value.
ReplyNamespaceReply decoders such as blob, text, integer, optional and pairs.
RedisKeyNamespaceTyped keys: make, text, json, schemaText.
PayloadCodecNamespaceValue codecs: text, json, schemaText.
StreamPayloadNamespaceA single-field stream entry codec.
RedisScriptNamespacemake builds a script with its SHA-1 digest and reply decoder.
RedisProfilesNamespaceDeployment profiles for engines and managed providers.
RedisTelemetryNamespacelayer(options?) turns on metrics and spans.

Functions and schemas

ExportKindPurpose
defineCommandFunctionBuild a Command from metadata, tokens, routing and a decoder.
fromPreparationFunctionBuild a Command from an effectful preparation step.
encodeCommandFunctionEncode a command into a RESP frame.
makeRespDecoderFunctionCreate an incremental RESP decoder.
decodeRedisConfigFunctionValidate and normalize connection input.
decodeSentinelConfigFunctionValidate and normalize Sentinel input.
encodeFloat32FunctionEncode coordinates as a float32 vector blob.
expiryAfterFunctionTurn a Duration into a SET expiry.
keySlotFunctionCompute the cluster hash slot of a key.
makeConnectionFunctionCreate a scoped connection.
makeExecutorFunctionCreate a RedisExecutor over a connection.
makeRedisFunctionBuild the Redis client from an executor.
makeRedisAdminFunctionBuild RedisAdmin from sessions.
makeRedisClusterFunctionBuild RedisCluster.
makeRedisMonitorFunctionBuild RedisMonitor.
makeRedisPubSubFunctionBuild RedisPubSub.
makeRedisScriptsFunctionBuild RedisScripts.
makeRedisSearchFunctionBuild RedisSearch.
makeRedisSentinelFunctionBuild RedisSentinel.
makeRedisSessionsFunctionBuild RedisSessions.
makeRedisShutdownFunctionBuild RedisShutdown.
makeRedisStreamsFunctionBuild RedisStreams.
makeRedisTrackingFunctionBuild RedisTracking.
StreamIdSchemaSchema for a stream ID.
StreamBoundSchemaSchema for a range bound, with an optional exclusive (.
StreamPositionSchemaSchema for an ID or a bare millisecond.

Errors

Each error is a Schema.TaggedErrorClass with its own page section in Errors: AdmissionError, BatchError, ClusterError, CommandInputError, ConnectionError, CredentialError, DiagnosticError, HandshakeError, PayloadError, ProfileError, ProtocolError, RedisConfigError, ReplyError, SentinelError, ServerError, SessionError, StreamConsumerError, SubscriptionError, TransactionError, TransportError, UnsupportedCommandError, UpstashError.

Types

Search. SearchAggregateOptions, SearchAggregateResult, SearchAggregateStep, SearchCollectReducer, SearchCommonOptions, SearchConfiguration, SearchCreateOptions, SearchCursorOptions, SearchDocument, SearchField, SearchFields, SearchHybridOptions, SearchHybridVector, SearchIndexState, SearchLegacyAddOptions, SearchOptions, SearchProfile, SearchReducer, SearchResult, SearchReturnField, SearchScore, SearchSpellcheckOptions, SearchSpelling, SearchSuggestion, SearchSuggestionOptions, SearchVectorAttributes.

TimeSeries. TimeSeriesAddOptions, TimeSeriesAggregation, TimeSeriesAggregator, TimeSeriesBlockingReadOptions, TimeSeriesBoundary, TimeSeriesCreateOptions, TimeSeriesGetOptions, TimeSeriesGetResult, TimeSeriesIncrementOptions, TimeSeriesLabelSelection, TimeSeriesLabels, TimeSeriesMultiAggregation, TimeSeriesMultiAggregationOptions, TimeSeriesMultiRangeOptions, TimeSeriesPivotKey, TimeSeriesPivotOptions, TimeSeriesRangeOptions, TimeSeriesReadCursor, TimeSeriesResult, TimeSeriesRow, TimeSeriesSample, TimeSeriesTimestamp.

Vectors. RawEmbedding, VectorAddOptions, VectorInput, VectorMatch, VectorQuery, VectorSimilarityOptions.

JSON. JsonGetOptions, JsonMatches, JsonNumericLegacy, JsonPath, JsonSetOptions.

Arrays. ArrayIndex, ArrayInfo, ArrayInfoDetails, ArrayPredicate, ArrayScanOptions, ArraySearchBound, ArraySearchOptions.

Streams. AddId, AutoClaimOptions, BlockingGroupOptions, BlockingReadOptions, ClaimOptions, ClaimPage, ClaimedGroupEntry, ContinuousReadStreams, FailureDecision, GroupCreateOptions, GroupEntry, GroupMessage, GroupReadId, GroupReadOptions, GroupReadStreams, GroupReaderKeys, GroupSetIdOptions, GroupStart, PendingEntry, PendingOptions, PendingReadOptions, PendingSummary, ProcessingOptions, ProcessingOutcome, ReadId, ReadStreams, ReaderOptions, ReferencePolicy, StreamAddOptions, StreamConfigOptions, StreamConsumerInfo, StreamEntry, StreamFieldInput, StreamFields, StreamFullConsumer, StreamFullGroup, StreamFullPending, StreamGroupInfo, StreamIds, StreamInfo, StreamInfoFull, StreamMessage, StreamNackOptions, StreamRangeOptions, StreamRead, StreamReadOptions, StreamStatistics, StreamTrim.

Sorted sets and geo. GeoAddOptions, GeoDetails, GeoOrigin, GeoPosition, GeoQuery, GeoResult, GeoSelection, GeoUnit, LexBound, RangeLimit, Score, ScoreBound, ScoredMembers, SortedAddOptions, SortedAlgebraOptions, SortedRange, SortedRangeWithScores.

Strings, keys, bits and lists. BitOperation, BitPositionRange, BitRange, BitfieldOperation, BitfieldRead, CopyOptions, DeleteCondition, Expiry, FloatIncrementExpiryOptions, HashExpireCondition, HashFields, HashSetExpiryOptions, IncrementExpiryOptions, KeyExpireCondition, KeyScanOptions, KeyValues, LcsMatch, LcsMatches, ListEnd, ListMoveOptions, ListPositionOptions, MultiSetOptions, RedisDecimal, RedisInteger, RestoreOptions, ScanOptions, ScanPage, SetCardinalityOptions, SetCondition, SetExpiry, SetOptions, SetResult, SortOptions, WriteSetOptions, WriteSetResult.

Pub/Sub, tracking and diagnostics. CacheOptions, Invalidation, MonitorOptions, MonitorRecord, PubSubMessage, RedisCacheClient, RedisMonitorClient, RedisPubSubClient, RedisShutdownClient, RedisTrackingClient, ShutdownClosed, ShutdownConnectionOptions, ShutdownOptions, SubscribeOptions, SubscriptionEvent, SubscriptionOptions, TrackingInfo, TrackingOptions, TrackingRuntimeOptions.

Cluster and Sentinel. ClusterAddress, ClusterMigrationGroups, ClusterNode, ClusterOptions, ClusterScanOptions, ClusterShard, ClusterSlotRanges, ClusterSlotState, ClusterSlotStatsOptions, ClusterTarget, ClusterTopology, RedisClusterClient, RedisSentinelClient, SentinelAddress, SentinelConfig, SentinelOptions, SentinelView.

Scripting and info. FunctionListOptions, InfoSection, RedisScriptsClient, ScriptArguments, ServerInfo.

Credentials. CredentialInput, CredentialLifetime, CredentialProvider, CredentialSnapshot, CredentialValues, RedisCredentialService, RefreshPolicy.

Commands, protocol and connections. BatchOutcomes, BatchResults, BatchSlot, Command, CommandDefinition, CommandMetadata, ConnectionOptions, ConnectionSnapshot, PartialBatchError, PreparedCommand, PushReply, RawContract, RedisArgument, RedisCommand, RedisConnection, RedisError, RedisExecutor, ReplyDecoder, RespDecodeLimits, RespDecoder, RespEncodeLimits, RespPairs, RespValue, Routing, TransactionOutcome, TransportConnection.

Service clients. RedisAdminClient, RedisClient, RedisSearchClient, RedisSession, RedisSessionsClient, RedisStreamsClient.

Configuration. BlockingOptions, DeploymentProfile, NetworkPolicy, RedisConfig, RedisConfigInput, ScriptOptions, SessionOptions.

@effect-kit/redis/node

RedisNode has six constructors. The Config variants take an Effect Config of the same input and unwrap it when the layer is built.

ExportKindPurpose
RedisNode.layerLayerStandalone client from a NativeClientInput. Provides Redis, RedisSessions, RedisStreams, RedisScripts, RedisAdmin, RedisPubSub, RedisCredentials, CommandExecutor, BatchExecutor and Crypto.
RedisNode.layerConfigLayerThe same from a Config<NativeClientInput>.
RedisNode.layerClusterLayerCluster client from a NativeClusterInput. Provides Redis, RedisCluster, RedisCredentials, CommandExecutor, BatchExecutor and Crypto.
RedisNode.layerClusterConfigLayerThe same from a Config.
RedisNode.layerSentinelLayerSentinel client from a NativeSentinelInput. Provides Redis, RedisSentinel, RedisSentinelCredentials, RedisCredentials, CommandExecutor, BatchExecutor and Crypto.
RedisNode.layerSentinelConfigLayerThe same from a Config.
TransportServiceRe-export of the root Transport.
connectFunctionOpen one transport connection.
layerLayerThe Transport layer for Node. It is not a Redis client.
cryptoLayerLayerCrypto for SHA-1 script digests.
NativeClientInput, NativeClusterInput, NativeSentinelInput, NativeCredentials, TransportConnectionTypesInput and transport types.

@effect-kit/redis/bun

The same exports as ./node, with RedisBun in place of RedisNode and the Bun transport behind connect and layer.

ExportKindPurpose
RedisBun.layer, layerConfig, layerCluster, layerClusterConfig, layerSentinel, layerSentinelConfigLayersSame as the RedisNode constructors.
Transport, connect, layer, cryptoLayerValuesSame as ./node, for Bun.
NativeClientInput, NativeClusterInput, NativeSentinelInput, NativeCredentials, TransportConnectionTypesSame as ./node.

@effect-kit/redis/upstash

ExportKindPurpose
RedisUpstash.layerLayerUpstash client over fetch. Provides Redis, CommandExecutor, BatchExecutor, RedisCredentials and UpstashEvents.
RedisUpstash.layerWithHttpClientLayerThe same, using the HttpClient you provide.
RedisUpstash.layerConfigLayerThe same from a Config<UpstashClientInput>.
layerLayerA simpler preset that takes an UpstashConfigInput.
makeUpstashFunctionBuild the Upstash client from { url, token, ... }.
decodeUpstashConfigFunctionValidate an UpstashConfigInput.
UpstashEventsServicesubscribe(channel) and monitor() over server-sent events. Each returns a scoped { messages, close }.
UpstashErrorErrorHTTP failures. Also exported from the root.
CommandsNamespaceUpstash dialect commands for Search, Vector and ACL tokens.
UpstashClientInput, UpstashConfig, UpstashConfigInput, UpstashMessage, UpstashSubscriptionTypesInput and event types.

Upstash has no RedisSessions, RedisStreams, RedisScripts, RedisAdmin or RedisPubSub. See Upstash.