{"id":46568,"library":"syllabus","title":"Syllabus - Redis Command Mix-ins and Protocol Helpers","description":"Syllabus is a collection of helpers and mix-ins for encoding Redis commands and decoding Redis replies, built upon the Sermone protocol module. The current stable version is 1.1.0 (released 2017, low release cadence). It supports over 190 Redis commands across all command groups, includes a LUA script cache via Camphora, and handles semantic versioning via Hoar. Key differentiators: it focuses on command encoding/decoding rather than full client implementation, designed to be extended; it provides a cache for LUA scripts and mixes in all Redis commands as methods. It is part of the rootslab ecosystem that also includes Libra and Spade for full client functionality.","status":"maintenance","version":"1.1.0","language":"javascript","source_language":"en","source_url":"git://github.com/rootslab/syllabus","tags":["javascript","syllabus","Σ","RESP","redis","redis commands","redis protocol encoder","redis reply formatter","command mix-ins"],"install":[{"cmd":"npm install syllabus","lang":"bash","label":"npm"},{"cmd":"yarn add syllabus","lang":"bash","label":"yarn"},{"cmd":"pnpm add syllabus","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Redis protocol encoder/decoder","package":"sermone","optional":false},{"reason":"LUA script caching","package":"camphora","optional":false},{"reason":"Semantic versioning handling","package":"hoar","optional":false},{"reason":"General utilities","package":"bolgia","optional":false},{"reason":"General utilities","package":"abaco","optional":false}],"imports":[{"note":"Package is CJS only; no ESM or named exports. Must use require and instantiate.","wrong":"import { Syllabus } from 'syllabus';","symbol":"Syllabus","correct":"const Syllabus = require('syllabus'); const obj = new Syllabus();"},{"note":"Syllabus is a constructor; calling without new will cause context errors.","wrong":"const s = Syllabus();","symbol":"new Syllabus()","correct":"const s = new Syllabus();"},{"note":"lua is an instance property, not a static one. Only available after construction.","wrong":"Syllabus.lua","symbol":"Syllabus.lua","correct":"new Syllabus().lua;"}],"quickstart":{"code":"const Syllabus = require('syllabus');\nconst s = new Syllabus();\n// Encode a Redis SET command\nconst encoded = s.set('foo', 'bar');\nconsole.log(encoded); // e.g. '*3\\r\\n$3\\r\\nSET\\r\\n$3\\r\\nfoo\\r\\n$3\\r\\nbar\\r\\n'\n// Decode a Redis reply\nconst reply = s.decodeReply('+OK\\r\\n');\nconsole.log(reply); // 'OK'\n// Use the LUA script cache\nconst sha = s.lua.cache('return 1');\nconsole.log(sha); // SHA1 hex string","lang":"javascript","description":"Demonstrates basic usage: encoding a Redis SET command, decoding a reply, and using the LUA script cache."},"warnings":[{"fix":"Consider using a full-featured Redis client like ioredis or redis instead.","message":"The 'sermone' module is no longer maintained and has known issues with modern Node.js versions.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Always use new Syllabus() or const s = new Syllabus();","message":"Missing 'new' keyword when constructing Syllabus will cause TypeError: Cannot set property of undefined.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate to actively maintained Redis clients like ioredis or node-redis.","message":"The entire rootslab ecosystem (Syllabus, Libra, Spade) is in maintenance mode with no updates since 2017.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure Camphora is installed and accessible; use new Syllabus().lua","message":"The 'lua' property is only available after instantiation and requires Camphora dependency.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.0':39 '190':48 '2017':41 'across':51 'also':107 'built':28 'cach':59,87 'cadenc':44 'camphora':61 'client':78,114 'collect':13 'command':3,23,50,53,73,96,122,129 'current':35 'decod':25 'design':80 'differenti':69 'ecosystem':105 'encod':21,125 'encoding/decoding':74 'extend':83 'focus':71 'formatt':128 'full':77,113 'function':115 'group':54 'handl':63 'helper':9,15 'hoar':67 'implement':79 'in':6,19,132 'includ':55,108 'javascript':116 'key':68 'libra':109 'low':42 'lua':57,89 'method':98 'mix':5,18,92,131 'mix-in':4,17,130 'modul':33 'part':101 'protocol':8,32,124 'provid':85 'rather':75 'redi':2,22,26,49,95,120,121,123,126 'releas':40,43 'repli':27,127 'resp':119 'rootslab':104 'script':58,90 'semant':64 'sermon':31 'spade':111 'stabl':36 'support':46 'syllabus':1,10,117 'upon':29 'version':37,65 'via':60,66 'σ':118","created_at":"2026-06-07T13:00:33.845380+00:00","updated_at":"2026-06-07T13:00:33.845380+00:00","problems":[{"fix":"Use new Syllabus() to create an instance.","cause":"Calling Syllabus() without new, returning undefined or a different object.","error":"TypeError: Cannot set property 'connection' of undefined"},{"fix":"Install sermone: npm install sermone","cause":"Missing peer/sibling dependency 'sermone' required by Syllabus.","error":"Cannot find module 'sermone'"},{"fix":"Use new Syllabus().lua","cause":"Accessing .lua statically instead of from an instance.","error":"Syllabus.lua is undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/rootslab/syllabus","github":"git://github.com/rootslab/syllabus","docs":null,"changelog":null,"pypi":null,"npm":"syllabus","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}