Quickstart

Save the following as index.html, run Castdeck, and point an OBS Browser Source at the file — comments will start flowing.

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <script src="http://localhost:3030/sdk/castdeck-sdk.js"></script>
  <style> body { font: 18px sans-serif; color: #fff } .row { padding: 4px 8px } </style>
</head>
<body>
  <div id="log"></div>
  <script>
    CastdeckSDK.setup().connect().subscribeKind("comment", function (ev) {
      var row = document.createElement("div");
      row.className = "row";
      row.textContent = ev.name + ": " + ev.message;
      document.getElementById("log").prepend(row);
    });
  </script>
</body>
</html>

Optional: castdeck-template.json (name / author / version)

{
  "name": "My First Template",
  "author": "you",
  "version": "1.0.0",
  "kind": "display"
}

Next steps

Check every field you can subscribe to in the SDK Reference, or let an AI build one for you with the context pack.