manifest.json reference
Every widget has a manifest.json at the root of its .nepget bundle. It tells
NepTunes how to load and present the widget.
Required fields
| Field | Type | Description |
|---|---|---|
manifestVersion | Int | Manifest format version. Always 1. |
id | String | Unique identifier in reverse-domain notation, e.g. com.example.my-widget. |
name | String | Display name shown in the widget picker. |
version | String | Semantic version, e.g. 1.0.0. |
entry | String | Entry HTML file, typically index.html. |
defaultSize | Object | Default window size: { "width": Int, "height": Int } in pixels. |
Optional fields
| Field | Type | Description |
|---|---|---|
author | String | Author name. |
description | String | Short description of the widget. |
license | String | License identifier, e.g. MIT. |
homepage | String | Homepage URL. |
minSize | Object | Minimum window size { width, height }. |
maxSize | Object | Maximum window size { width, height }. |
resizable | Bool | Whether the user can resize the widget. Defaults to false. |
preview | String | Preview image filename inside the bundle. |
icon | String | Icon filename inside the bundle. |
permissions | Array | The permissions the widget needs. |
settings | Object | A { "schema": [ … ] } object describing user settings. |
Complete example
This is the manifest from the “Now Playing” widget in the gallery:
{
"manifestVersion": 1,
"id": "pl.micropixels.neptunes.widget.now-playing",
"name": "Now Playing",
"version": "1.9.0",
"author": "NepTunes",
"description": "Displays the currently playing track with playback controls",
"license": "MIT",
"homepage": "https://neptunesmac.app",
"entry": "index.html",
"defaultSize": { "width": 368, "height": 220 },
"minSize": { "width": 328, "height": 200 },
"resizable": false,
"preview": "preview.jpg",
"permissions": ["artwork", "playbackControl"],
"settings": {
"schema": [
{
"id": "showArtwork",
"type": "checkbox",
"label": "Show Album Artwork",
"default": true
},
{
"id": "theme",
"type": "radio",
"label": "Theme",
"options": [
{ "value": "dark", "label": "Dark" },
{ "value": "light", "label": "Light" }
],
"default": "dark"
}
]
}
}