Skip to main content

Create a Plugin

1

Create the directory

mkdir packages/plugins/my-plugin
2

Define plugin.json

{
  "name": "my-plugin",
  "displayName": "My Plugin",
  "description": "What this plugin does",
  "version": "1.0.0",
  "author": "Your Name",
  "icon": "./icon.svg",
  "inputSchema": {
    "type": "object",
    "properties": {
      "title": { "type": "string" },
      "url": { "type": "string" }
    },
    "required": ["title"]
  },
  "permissions": {
    "httpRequests": true,
    "maxHttpDomains": ["api.example.com"]
  },
  "env": [
    {
      "key": "API_KEY",
      "label": "API Key",
      "required": true,
      "secret": true,
      "description": "Your API key for the external service."
    }
  ]
}
3

Create render.html

<!DOCTYPE html>
<html>
  <head>
    <style>
      body {
        font-family: sans-serif;
        padding: 16px;
        color: #1a1a19;
        background: transparent;
      }
      body.dark { color: #e5e5e4; }
    </style>
  </head>
  <body>
    <div id="app">
      <h3 id="title"></h3>
      <p id="info"></p>
    </div>
    <script>
      document.addEventListener('DOMContentLoaded', function () {
        if (Placet.theme === 'dark') document.body.classList.add('dark');
        document.getElementById('title').textContent = Placet.data.title;
        document.getElementById('info').textContent = Placet.data.url || 'No URL';
        Placet.resize();
      });
    </script>
  </body>
</html>
4

Optionally add an icon

Place an icon.svg (or .png) in the plugin directory and reference it in plugin.json:
{ "icon": "./icon.svg" }
5

Restart the backend

make stop && make start
The plugin is automatically discovered and available.
6

Configure env values

Go to Settings → Plugins, expand your plugin, fill in the environment variables, and click Save.

Manifest Reference

Top-Level Fields

FieldRequiredDescription
nameYesUnique plugin identifier (kebab-case)
displayNameYesHuman-readable name
versionYesSemver version
descriptionNoShort description
authorNoAuthor name
iconNoRelative file path (./icon.svg) or Lucide icon name
inputSchemaNoJSON Schema for the plugin’s input data
permissions.httpRequestsNoWhether the plugin can make HTTP requests
permissions.maxHttpDomainsNoAllowed domains for HTTP requests (["*"] = any)
envNoArray of environment variable definitions

Environment Variables

Each entry in the env array:
FieldRequiredDescription
keyYesVariable name (e.g. API_KEY)
labelYesHuman-readable label for the Settings UI
requiredNoWhether this variable must be set
defaultNoDefault value
secretNoIf true, rendered as a password field
descriptionNoHelp text shown below the input
Env values are configured per-plugin in Settings → Plugins and stored in the database, version-coupled. Plugins access them at runtime via Placet.env.

Validate a Plugin

Use the included validation script:
npx ts-node scripts/validate-plugin.ts packages/plugins/my-plugin