esc

addon.json

The manifest names the add-on, describes it in the Store, says what it shows and what it needs, and tells Ledge which program to run.

Fields

FieldRequiredRules
idYesPermanent. 1 to 64 lowercase letters, digits and hyphens. Never change it after publishing
versionYesThree whole numbers separated by dots, like 1.2.0. Ledge won't install an older version over a newer one
protocolVersionYes2 for a session. 1 is the older one-run-per-request worker
nameYesThe name in the Store and Settings. Can't be blank
summaryYesOne line under the name in the Store
descriptionYesWhat it does, a sentence or two
authorYesWho made it. Shown when Ledge asks you to trust it. Can't be blank
capabilitiesYesWhat it asks Ledge for, from the list below. No repeats; can be empty
executableYesThe program's file name in the package. No folders, slashes or control characters
iconNoA PNG written Assets/Icon.png. Without it, Ledge uses a standard icon
surfacesNoWhat it shows, from the list below. Ledge draws nothing that isn't listed
kit.minAPINoThe LedgeKit it was built with, like 0.13.0. An older Ledge marks it as needing an update instead of installing it
minLedgeNoThe oldest Ledge that runs it, like 0.3.0
minMacOSNoThe oldest macOS it needs, like 15.0, when that's newer than Ledge's own
categoryNoIts Store section: AI, Productivity, Media, Capture, Files or System
creatorNoname, and optionally url and avatar, shown on its Store page
sourceNorepository and license, an SPDX name like MIT
keywordsNoUp to 20 search words of up to 40 characters

Surfaces

Each one has its own page. An add-on sends a surface only after listing it here; Ledge refuses and logs anything else.

Capabilities

A capability is something the add-on asks Ledge to do for it. Ledge lists them when it asks you to trust the add-on, and grants only the ones it knows. A name Ledge doesn't know isn't an error: the package still installs, and that capability stays off, so an add-on built for a newer Ledge still loads.

CapabilityWhat it allows
hudMessages in the notch with LedgeHost.notify
clipboard-writePutting text on the clipboard with LedgeHost.copy
notch-controlOpening the add-on's page and keeping the notch open, with LedgeHost.showPage and holdOpen. 0.13.0
spotify-libraryAsking Ledge to read and change your Spotify Liked Songs, through the account broker. The add-on never gets a token
notification-bannersReceiving the text of visible notification banners, which Ledge reads with Accessibility access
apple-music-queueReading and reordering Apple Music's Playing Next
apple-music-controlsChanging favourites and adding songs to Apple Music playlists

Settings, the environment and opening links need no capability.

A full example

addon.json
{
  "id": "timer",
  "version": "1.1.0",
  "protocolVersion": 2,
  "name": "Timer",
  "summary": "A countdown beside your notch",
  "description": "Start a countdown from the menu bar or the add-on's page.",
  "author": "Ledge examples",
  "capabilities": ["hud"],
  "executable": "Timer",
  "icon": "Assets/Icon.png",
  "surfaces": ["settings-page", "activity", "lock-screen-row", "menu-bar-tile"],
  "kit": { "minAPI": "0.13.0" },
  "category": "Productivity",
  "creator": { "name": "Ledge examples" },
  "source": { "repository": "https://github.com/your-account/timer" }
}

The icon

A real PNG, no larger than 2048 by 2048 pixels and 4 MB. Packages in the Store must include Assets/Icon.png, and you must own it or have permission to use it.

Validation errors

AddOnManifest.validate(), which Ledge also runs, throws a ManifestValidationError. The CLI prints the same message:

ErrorMessage
invalidField(name)Invalid manifest field: name.
unsupportedProtocol(n)Unsupported protocol version: n. Supported: 1 and 2.
unsupportedCapability(c)Malformed capability name: c.