Build a plugin
What a plugin of your own can do, what it is made of, and how it reaches the Marketplace.
A plugin of your own sorts texts the way you'd like them sorted: bills in a tab of their own with the amount on the row, a parcel's tracking number a press away, receipts marked read as they come. It's one file you write by hand that says what to look for in a text and what to do with it. You try it on your own device in Developer mode, then send it to the Marketplace, where it's reviewed before anyone else can add it.
What a plugin can do
- Tag texts by their words: "your bill is ready", "amount due $45.20", a tracking number. A tag can keep what it found, like the amount.
- Give texts a tab of their own beside Messages and Codes, or a kind in the list's filter that people show or hide.
- Draw its texts' rows: a value large on the row (the amount, a tracking number), a short caption, a face with a letter and a colour, and a button at the row's end.
- Add buttons: lines in a conversation's menu in the list, a button in a conversation's header, lines in a message's menu. A button can say something, copy words to the clipboard, write a reply for you to send, mark the conversation read, move it to one of the plugin's tabs or back to Messages, or open the plugin's own web page.
- Act as texts come: mark texts in its own tabs and kinds as read, or take their notification away, but only behind a switch in its settings that starts off.
- Have settings of its own: switches, choices, and words the person types (more words for bills, say), shown on its page in the Marketplace.
What it can't do
- It can't reach the internet, and it isn't code: nothing in it runs. It's a description the app follows. A button you press can open its one web page in your browser, and that's all.
- It never sees your contacts' texts, group texts, texts sent with Uplink's encryption, your own messages, chats on other networks (Telegram, Signal and the rest), or circles and spaces.
- It never acts on a text with a sign-in code in it. It can tag one, but never sort it into a tab, mark it read or silence it.
- It can't change the words of a message, or who a conversation is from: a row always keeps the conversation's own name.
- It's for you alone, on one device. Plugins from other developers can't be turned on for a whole circle yet.
One file: ghost-plugin/1
A plugin is one file, <id>.uplinkplugin, of JSON in the ghost-plugin/1 format: its name and description, its icon, what it may do, its settings, and its rules. It finds words in a text with phrases like amount due {amount}, never with code or regular expressions, so no plugin can hang the app, and one that's slow is paused. Every field is on The plugin file.
{
"format": "ghost-plugin/1",
"id": "mybills",
"version": "1.0.0",
"name": "My bills",
"tagline": "Bills in a tab of their own",
"description": "Texts that say a bill is ready go to a Bills tab, with the amount on the row.",
"symbol": "calculator",
"hue": "amber",
"shelf": "organise",
"labels": ["bills"],
"permissions": ["sort"],
"rules": {
"tags": [{"tag": "bill", "any": ["your bill is ready", "amount due {amount}"], "detail": {"from": "token"}}],
"sections": [{"key": "bills", "label": "Bills", "icon": "calculator", "kind": "tab", "takes": {"tagged": ["bill"]}, "row": {"value": "{tag:bill}"}}]
}
}
That's a whole plugin, as small as one can be: Developer mode loads it as it is. To submit it, it also needs an icon, your username and a help address (the whole Bills file has them).
Where it runs
- An Android phone: everything, as your texts come.
- A computer paired with an Android phone: it sorts the phone's texts there too, once it's added on the computer (plugins are added on each device on its own). Marking read and silencing as texts come happen on the phone only.
- A Mac or Windows PC on its own has no texts, so a plugin does nothing there.
- iPhone: plugins from other developers aren't on iPhone at all, because of the App Store's rules for apps that add other developers' features. Developer mode can still load your own there, to try it with Try it.
From an idea to the Marketplace
Write it
Start from one of the examples below and change it, or write one from nothing with The plugin file beside you. Any text editor will do.
Try it in Developer mode
Load it in Settings › Developer › Plugins in development from a file, a link or the clipboard, then try it on a text without waiting for one to come. Change it, press Reload, try it again. Your first plugin walks through it.
Submit it
Marketplace › Submit a plugin: the plugin, its icon, description and tags, a screenshot or two, and a note for the reviewer. Submit it to the Marketplace.
Review
A person at Uplink reads the whole file, tries it, and approves it, asks for changes or turns it down. Marketplace › My submissions shows where it stands, and the app tells you when that changes.
Listed
Approved, it's in Discover for everyone with the Reviewed mark, under your username. People see what it can do before they add it, and can report it from its page.
The examples
Two complete plugins to start from, each one file:
| Example | What it shows |
|---|---|
| Bills | An amount found in a text and shown large on its row, a tab and a kind, a setting of the person's own words, and marking receipts read behind a switch. |
| Parcels | Words between words, tracking codes, a choice setting, a reply to send, a link, moving a conversation back to Messages, and silencing behind a switch. |
They're on this site at https://gogho.st/docs/examples/bills.uplinkplugin and https://gogho.st/docs/examples/parcels.uplinkplugin, which Developer mode can load as they are, and in the app's repository in examples/plugins on GitHub, with a note on each. Their ids, bills and parcels, can't be submitted: give yours an id of its own.
Docs