Manifest

Every plugin has a manifest.json at its root.

{
  "id": "yourname.rename-layers",
  "name": "Rename Layers",
  "version": "1.2.0",
  "description": "Batch-rename the selected layers with a pattern.",
  "author": "Your Name",
  "main": "main.js",
  "ui": "ui.html",
  "permissions": ["read", "write"],
  "commands": [
    { "id": "rename", "label": "Rename selection" },
    { "id": "number", "label": "Number selection" }
  ]
}

Fields

FieldRequiredDescription
id✓Unique, permanent identifier. 2–64 characters: letters, digits, ., _, -, starting with a letter or digit. Use a prefix you own, e.g. acme.color-tools. On the marketplace the id belongs to whoever publishes it first; popcraft. and popcraft-examples. are reserved for PopCraft (plugin ids).
name✓Display name shown in menus, the plugin manager and the marketplace.
version✓Version string. Use dotted numbers (1.4.2); see versioning.
main✓*Path to the main script inside the package. *Optional when the plugin only contributes data such as themes.
uiPath to the panel HTML. Required if you call popcraft.showUI().
descriptionOne or two sentences, shown in the plugin manager and marketplace.
authorShown in the marketplace. Defaults to your account name when publishing.
permissionsWhat the plugin may do (see below). Defaults to none.
commandsMenu entries. Each has an id (passed to your script as popcraft.command) and a label. Defaults to a single command, run (none for plugins without main).
contributesStatic contributions that need no code. contributes.themes lists UI themes: see Publishing themes. contributes.importers lists File → Import / Home drop formats (id, label, accept, optional command). contributes.panels lists sidebar panels.

Unknown fields are ignored.

Reserved command: don't declare a command with the id widget. PopCraft uses it when it starts your plugin to handle a widget click.

Permissions

The permissions a manifest asks for, at the first run · 0:06
Description

A brainstorm board, with the Contrast Checker plugin installed. Its Check the whole page command is run from the plugin manager. The first run lists what its manifest asks for — reading and changing the file — and Allow and run lets it run; the result shows in its notice.

PermissionGrants
readRead the current file: layers, selection, pages, styles, variables. Also required to receive selectionchange, pagechange and documentchange events.
writeEdit the current file: create, update and delete layers, set the selection, set text, create paint styles, set variable values.
exportRender layers to PNG, JPG, WEBP, SVG or PDF.
networkMake network requests (fetch, XMLHttpRequest, WebSockets) and load remote images and fonts, from both the main script and the UI.

Always available without permissions: notifications, showing a panel, per-plugin storage, closing the plugin, and the widget API for the plugin's own widgets.

Ask for the least you need:

  • Users see the list of permissions before first run and can decline.
  • On the marketplace, a version that adds a permission goes back through review.