Skip to content

Quickstart ​

A working plugin running in Dissent in about five minutes: two small files, a one-line local server, three clicks. No build step.

1. Make the two files ​

Make a folder called hello-plugin with these two files in it.

manifest.json — what the plugin is and what it may do:

json
{
  "id": "hello-plugin",
  "name": "Hello Plugin",
  "version": "0.1.0",
  "description": "Says hello.",
  "tier": 1,
  "context": ["sidebar"],
  "url": "http://localhost:8787/index.html",
  "sdk_version": "1",
  "declared_permissions": [],
  "allowed_fetch_domains": [],
  "config_schema": null
}

index.html — the plugin itself:

html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <script src="https://app.dissent.chat/sdk/v1/dissent-plugin-sdk.iife.js"></script>
  <style>
    body { font-family: system-ui, sans-serif; color: rgba(255,255,255,.88); background: transparent; padding: 14px; }
  </style>
</head>
<body>
  <h3 id="title">Loading…</h3>
  <p id="where"></p>
  <script>
    const title = document.getElementById('title');
    const where = document.getElementById('where');
    Dissent.init({ onFallback: () => { title.textContent = 'Open me inside Dissent.'; } }).then((ctx) => {
      // textContent, never innerHTML, for anything that came from Dissent.
      title.textContent = 'Hello 👋';
      where.textContent = 'You are on ' + ctx.server.name + (ctx.channel ? ', in #' + ctx.channel.name : '') + '.';
    });
  </script>
</body>
</html>

Once it is installed for real (step 6), change the SDK line to <script src="/sdk/v1/dissent-plugin-sdk.iife.js"></script> so the plugin takes the SDK from the Dissent site that serves it rather than from app.dissent.chat.

2. Serve the folder ​

From inside hello-plugin:

bash
npx serve --cors -l 8787

--cors matters: Dissent reads manifest.json from your browser, and without it the browser refuses.

3. Turn on custom plugins ​

In Dissent, on a server you own: Server Settings → Plugins. Turn on Allow custom plugins and Developer mode. Developer mode is what lets a server install from localhost; leave it off on servers where you are not building anything.

4. Install it ​

Same page, under Import from manifest URL: paste http://localhost:8787/manifest.json, press Fetch, then Install (Unverified).

If your browser asks to let the site reach devices on your local network, allow it — that is how a web page reaches localhost. The desktop app does not ask.

5. Put it on a channel ​

Right-click a channel → Manage Plugin:

  • a sidebar plugin goes under Sidebar Plugins and shows in the right-hand panel while that channel is open;
  • a channel plugin is set as the channel plugin and fills the channel.

Open the channel. You should see "Hello 👋" and where you are.

Only you see it running: every viewer's Dissent loads localhost from their own computer.

6. Change it, then share it ​

Edit index.html, then close and reopen the channel. When you are happy, put the folder on any https address, change "url" in manifest.json to match, and install from there instead — or ask the person who runs your Dissent site to add it to their plugin market.

Next steps ​