Redisk is a TypeScript ORM for Redis, currently at version 2.1.7. It provides decorator-based entity mapping with support for primary keys, unique keys, indexes, and relations (HasOne). It allows CRUD operations, filtering with multiple conditions, pattern matching (similar to LIKE), and list queries with pagination and sorting. Compared to other Redis ORMs, it offers a TypeScript-first approach with decorators, built-in cascade operations for relations, and a query API that resembles traditional SQL ORMs. It supports connections via URL or individual options and includes logging.
npm install rediskNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing Redisk with a Redis URL, defining a User entity with decorators, saving an instance, and retrieving it by primary key.
Remove the option or use the default (true).
Remove @Indexed() if @Unique() is already present.
Use await Redisk.init(options) or .then() to get the instance.
Replace redisk.create(entity) with redisk.save(entity).
Ensure all persisted fields are decorated with @Property().
const redisk = await Redisk.init(options);
Ensure all @Property() fields are primitive types (string, number, boolean) or use @HasOne for relations.
Add @Primary() decorator to the property that serves as the primary key.
Run 'npm install redisk' and ensure tsconfig.json includes 'node_modules/@types' or has 'esModuleInterop' enabled.