Uplink Docs Get Uplink
Build a plugin

The plugin file

Every field of a ghost-plugin/1 file, with its limits.

A plugin is one file of JSON, named <id>.uplinkplugin, in the ghost-plugin/1 format: one object holding the fields below. It's at most 256 KB (262,144 bytes) and nested at most 8 deep. Numbers in it are whole numbers, and null appears only where a field says it may. A key the format doesn't have is a problem at any depth (unknown_field), so a reviewer sees everything a plugin holds. Developer mode loads any file name, and the file laid out however you like.

The fields

FieldWhat it isRules
formatThe formatRequired. Exactly "ghost-plugin/1".
idYour plugin's idRequired. 3 to 24 lower-case letters and digits, starting with a letter; not one the app keeps (below).
versionThis version, like 1.0.0Required. Three whole numbers with dots between, each 0 to 99999 with no leading zero. Compared number by number: 1.10.0 is newer than 1.9.0.
nameWhat it's calledRequired. 1 to 32 characters, one line. Not a built-in plugin's name nor Uplink's.
taglineIts short line, under its nameRequired. 1 to 60, one line.
descriptionWhat it does, on its pageRequired. 1 to 1,500; line breaks allowed.
iconIts pictureA square PNG in base64 (below). Not needed in Developer mode; needed to submit it.
symbolThe plain icon drawn where a row needs one, and on its tile when it has no pictureAn icon name (below). puzzle if left out.
hueIts colourRequired. One of the sixteen hues below.
shelfIts category in the MarketplaceRequired. organise, safety, messages or tools.
labelsIts tags in the Marketplace: on its card, on its page and in searchRequired. 1 to 4 different ones from the sixteen below.
permissionsWhat it may do beyond reading textsRequired, and may be []. Each one a rule uses must be listed (needs_permission), and each one listed must be used (permission_unused). What a plugin may do.
linksThe one web page its buttons may open0 or 1 https address (below), [] if left out.
shotsThe SHA-256s of its screenshots, in order0 to 4. The submission form fills this in from the screenshots you add; leave it out.
developerYour usernameNeeded to submit it; the form puts yours in. 3 to 20 lower-case letters, digits, dots and underscores, starting with a letter or digit, with no .. and none of uplink, ghost, gogho, official, verified or support in it.
supportWhere people get help with itNeeded to submit it. An https address or an email address (below), at most 200 characters. Shown on its page for anyone to see.
whatsNewWhat this version changed0 to 500 characters; line breaks allowed.
minAppThe oldest Uplink it works inA version, as version. An older app refuses it (needs_newer_app).
settingsIts own settings0 to 24 (below); [] if left out.
rulesWhat it doesRequired. {"tags", "sections", "actions", "incoming"}, each optional, with at least one tag rule or one section (empty_pack). Tags, tabs and buttons.

Hues

amber blue coral cyan green indigo lime magenta mint orange purple red rose slate yellow graphite

Categories (shelf)

organise (Organise), safety (Safety), messages (Messages), tools (Tools).

Tags (labels)

In the fileShown asIn the fileShown as
billsBillsmoneyMoney
codesCodesquietQuiet
deliveriesDeliveriesrepliesReplies
eventsEventssafetySafety
filtersFiltersschoolSchool
healthHealthshoppingShopping
languageLanguagesortingSorting
travelTravelworkWork

Web and email addresses

A web address (in links, a link button's url, or support) is https, at most 200 characters, with no user name or password, no port, no # part, no spaces and no { or }. A query is allowed, but it's fixed: nothing from a text is ever put into an address. Its host is two or more parts of lower-case letters, digits and inner hyphens (example.com), none starting xn--; never an IP address, never a name ending .local, .lan, .home, .internal, .localhost or .arpa, and never gogho.st or ghost-sms.com, whose addresses the app opens itself (bad_url otherwise). An email address, for support only, is the usual name@example.com, its domain held to the same rules (bad_email).

Icon names

For symbol, and a section's, an action's or a setting's icon: any of the app's own icon names below. ghost, store and shield-check are kept for the app itself (its mark, the Marketplace and "Can't reach the internet"), and any other name is bad_icon_name.

activity alarm-clock alert-circle alert-triangle align-left anchor archive archive-restore arrow-down arrow-down-to-line arrow-left arrow-right arrow-up arrow-up-right-from-square arrow-up-to-line asterisk at-sign audio-lines ban baseline bell bold book book-open book-open-text bookmark bookmark-check bot box-select braces brain brush-cleaning calculator calendar-days calendar-plus calendar-search calendar-x chart-gantt chart-no-axes-combined check check-check check-circle-2 check-square chevron-down chevron-left chevron-right chevron-up chevrons-down chevrons-down-up chevrons-up chevrons-up-down circle circle-alert circle-check circle-dashed circle-dot circle-help circle-minus circle-question-mark circle-stop circle-user circle-x clipboard-paste clock code code-square compass contact-2 contact-round copy copy-plus crown curly-braces database door-open download ear edit edit-3 ellipsis ellipsis-vertical equal eraser external-link eye eye-off feather file file-code file-plus file-text film flag flame flask-conical folder folder-input folder-open folder-plus gauge git-branch globe graduation-cap grid-2-x-2-plus grid-2x2-plus grip-vertical group hard-drive hard-drive-download hard-drive-upload hash heading heading-1 heading-2 heading-3 help-circle highlighter history hourglass image image-plus info italic kanban-square key-round laptop layout-grid layout-list lightbulb link link-2 list list-checks list-filter list-ordered list-plus list-todo list-tree loader-2 loader-circle locate-fixed lock log-out magnet mail map-pin map-pinned maximize megaphone menu message-circle-question message-circle-question-mark message-square message-square-dashed message-square-plus message-square-quote mic minus minus-circle more-horizontal more-vertical network palette panel-left pause pen-box pen-line pen-square pencil pencil-line phone pin pin-off play plus puzzle refresh-cw repeat replace rotate-ccw rotate-ccw-clock rotate-cw scan-text scissors scroll-text search send settings shapes share-2 sidebar sigma sliders-horizontal smartphone snowflake sparkles spell-check spline square square-arrow-out-up-right square-check-big square-code square-dashed square-dashed-text square-kanban square-pen square-radical stars sticker stop-circle strikethrough subscript sun sun-moon sunrise superscript swatch-book table tag terminal text text-align-start text-cursor-input text-quote text-search text-select text-selection ticket trash trash-2 triangle-alert type underline undo-2 unlink usb user-2 user-check user-circle user-group user-minus user-plus user-round user-x users video volume-2 wand-2 wand-sparkles waves waves-horizontal wifi wifi-off workflow x x-circle zoom-in zoom-out

Ids, sections, tags and keys

WhatIn the fileIn the app
The pluginid: 3 to 24 lower-case letters and digits, starting with a letterx and its id: Bills is xbills. You'll see it in plugins.list and filters.classify, and its switch is plugin_xbills. No built-in plugin's id starts with x, so yours can never be mixed up with one.
A sectionkey: 1 to 12 lower-case letters, no digitsx, its id, 0, its key: xbills0bills. Never other.
A tagtag: 1 to 16 lower-case letters and digits, starting with a letterxbills.bill. A plugin's rules read only its own tags: it can't see, give or fake Spam's or Codes'.
A settingkey: 1 to 24 lower-case letters and digits, starting with a letterKept as plugin_xbills_extra.
An actionid: 1 to 24 lower-case letters and digits, starting with a letterUnique within the plugin.
A choicevalue: 1 to 16 lower-case letters and digitsUnique within its setting.

A pattern broken is bad_key (bad_id for the plugin's id). These ids are the app's own, and no plugin may have them (id_reserved): codes kinds spam embeds actions replies quiet strangers cleaner translate recordcall scribe captions watch debt political sales scams reminders food deliveries appointments notices other ghost ghostmessaging official admin system market marketplace store plugin plugins settings messages, and any id with uplink, ghost or gogho in it.

The examples' ids, bills and parcels, load in Developer mode like any other, but can't be submitted (id_example: "That's the example's id: give your plugin an id of its own."), so nobody takes the id every reader of these pages starts with.

The icon

To make the base64 on a Mac:

base64 -i icon.png | tr -d '\n'

In PowerShell on Windows:

[Convert]::ToBase64String([IO.File]::ReadAllBytes('icon.png'))

Words in a plugin

Every string in a plugin, its phrases included, keeps these rules (bad_text, or phrase_bad_text for a phrase):

A name, and a section's label, can't be a built-in plugin's or one of their tabs' and kinds', nor have uplink, ghost or gogho in it (name_reserved). They're compared with look-alikes folded first, so "Сodes" with a Cyrillic С, or "Codes" in wide letters, is still Codes.

Settings

Each setting is an object with a type, shown on the plugin's page in the order written; a heading starts a new card.

typeFieldsShown as
togglekey, label (1 to 60), hint (1 to 200), icon, and default (true or false, required)A switch
choicekey, label, hint, icon, options (2 to 8 of {"value", "label" (1 to 40), "hint" (1 to 120)}), and default (one of the values: choice_default otherwise)A choice of one
wordskey, label, hint, icon, placeholder (1 to 60)A field for the person's own words, a line each or with commas between: what a rule does with them
notelabel, hint, iconA line of words
headinglabel, hintA heading over the next card

The form it's sent in

When you submit a plugin, the app sends it in one fixed form: every object's keys sorted, no spaces or line breaks, every string written the one way. The Marketplace takes only that form, so a plugin's SHA-256 names exactly one file, and a change of one character is a new file that needs a new review. You never have to make it yourself: the submission form does, from whatever you loaded. Developer mode takes the file just as you wrote it.

The whole Bills file

The example on this site, bills.uplinkplugin, as it is. Parcels is the other one.

{
  "format": "ghost-plugin/1",
  "id": "bills",
  "version": "1.0.0",
  "name": "Bills",
  "tagline": "Bills and payment reminders in a tab of their own",
  "description": "Texts from companies about a bill (a statement that's ready, an amount due) go to a Bills tab, with the amount large on the row and a press to copy it. Receipts for payments you've made are a kind in the list's filter, which can mark them read as they come. Nobody in your contacts is ever sorted.",
  "icon": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAaklEQVR42u3awQ0AIAgAMfZfGoeQEMHeAMb0AT6MkCRJkq7K5gAAAPA2wLTzAQAAAAAAAAD1F6x68AAAAMAQBAAAAABbAAAAAIYgAAAAAGzbAgAAADAEAQAAAADAFgC/xAAA+AtAkiRJwzpcxpX3TIHg+gAAAABJRU5ErkJggg==",
  "symbol": "calculator",
  "hue": "amber",
  "shelf": "organise",
  "labels": [
    "bills",
    "money",
    "sorting"
  ],
  "permissions": [
    "sort",
    "copy",
    "markread"
  ],
  "developer": "yourname",
  "support": "https://example.com/plugins/bills",
  "settings": [
    {
      "type": "toggle",
      "key": "autoread",
      "label": "Mark receipts as read",
      "hint": "As they come: texts that say a payment went through.",
      "default": false,
      "icon": "check-check"
    },
    {
      "type": "words",
      "key": "extra",
      "label": "More words for bills",
      "hint": "A text with any of these goes to Bills too.",
      "placeholder": "council tax, water rates"
    }
  ],
  "rules": {
    "tags": [
      {
        "tag": "bill",
        "any": [
          "your bill is ready",
          "your statement is ready",
          "amount due {amount}",
          "amount due: {amount}",
          "payment of {amount} is due",
          "minimum payment due"
        ],
        "wordsFrom": "extra",
        "detail": {
          "from": "token"
        }
      },
      {
        "tag": "paid",
        "any": [
          "payment received",
          "thank you for your payment",
          "payment of {amount} received",
          "we've received your payment"
        ],
        "detail": {
          "from": "token"
        }
      }
    ],
    "sections": [
      {
        "key": "bills",
        "label": "Bills",
        "icon": "calculator",
        "kind": "tab",
        "takes": {
          "tagged": [
            "bill"
          ],
          "untagged": [
            "paid"
          ]
        },
        "row": {
          "value": "{tag:bill}",
          "caption": "A bill",
          "end": "copyamount"
        }
      },
      {
        "key": "receipts",
        "label": "Receipts",
        "icon": "check-check",
        "kind": "filter",
        "takes": {
          "tagged": [
            "paid"
          ]
        }
      }
    ],
    "actions": [
      {
        "id": "copyamount",
        "label": "Copy the amount",
        "icon": "copy",
        "slots": [
          "row",
          "list.conversation.menu",
          "conversation.message.menu"
        ],
        "when": {
          "tagged": [
            "bill"
          ]
        },
        "do": "copy",
        "text": "{tag:bill}",
        "say": "Amount copied"
      }
    ],
    "incoming": [
      {
        "in": "receipts",
        "do": [
          "markread"
        ],
        "setting": "autoread"
      }
    ]
  }
}
Something wrong or missing here? Tell us in the Alpha testers circle, or at the app's GitHub.