Plugins

Looks and importers other people made, on one shelf. Try a look on the whole window before you keep it; anything that reads asks you first, in plain words.

On this page
  1. Looks
  2. Importers
  3. Try a look first
  4. Anything that reads asks first
  5. When something is off
  6. Go back to the previous version
  7. Add a repository, or a single plugin
  8. Make one yourself
  9. Make your own
  10. Make your own look
  11. Have my agent make one

A plugin adds something to Ducter that someone else made: a look (colours and feel) or an importer that brings your past conversations in from another app. Pages and connectors come later.

Open Settings › 插件 / Plugins. At the top Ducter says which look you’re using and how many looks and importers you can still install.

Looks

Each look is a card: a small window in its own colours, its name, and its character in a word or two (暖色 / Warm, 冷色 / Cool, 素色 / Plain or 深色 / Dark). A look only changes colours and feel, and reads nothing. On the card: 试试 / Try it, 装上 / Install, 换上 / Use it or 正在用 / In use, and 更新 / Update when its repository has a newer version.

Importers

Each importer is a row: the app’s icon, its name, one fact (whether the app is on this computer, or how many conversations it brought in), and 装上 / Install, 更新 / Update or 已装 / Installed. What it brings in shows in Past tasks, read only.

A plugin from outside Ducter’s official repository says where it comes from: Ducter 查过 / Reviewed (the official repository lists this exact version), 你加的仓库 / From your repository, or 你自己加的 / Added by you.

Try a look first

试试 / Try it puts the look on the whole window for ten seconds. Nothing is installed: a bar at the bottom says so, with 留着 / Keep to install it and 换回 Pebble / Back to Pebble (or the look you were on). After ten seconds, or if you leave the page, your look comes back by itself.

装上 / Install on a look installs it and puts it on at once. A look is only data: it has no code, reads nothing of yours, never goes online and never changes how a page is laid out, so it doesn’t ask anything first. Pebble is always on the shelf, one tap away.

Anything that reads asks first

装上 / Install on an importer opens a sheet before anything happens. It says, one fact each:

If an importer goes online and the official repository hasn’t checked that version, you tick one more line before 装上 works. After it installs, Ducter tells you in the conversation what came in.

When something is off

Go back to the previous version

When a plugin updates, Ducter keeps the version you had, exactly as it was, and never runs it. If the new one doesn’t suit you, open the card’s ⋯ and choose 回到上一个版本 / Go back to the previous version. A look you’re using changes back in place; an importer keeps everything it brought in and the yes you gave it. The newer version is offered again as 更新 / Update whenever you want to try it once more.

If an importer’s new version fails the first time it runs, its row says 新版本没能带进来 / The new version didn’t work, with 回到上一个版本 right there. One previous version is kept for each plugin. From a terminal: ducter plugin rollback <name>.

Add a repository, or a single plugin

插件仓库 / Plugin repositories at the foot of the page lists the official repository and any you added; 加一个插件仓库 / Add a plugin repository adds another. From a terminal, ducter plugin add <folder-or-address> still installs one plugin directly, and ducter plugin list shows the look you’re using, the looks you installed and your importers, each with its state.

Make one yourself

ducter plugin new theme calm            # a look: its manifest and one colour file
ducter plugin new importer acme-notes   # an importer: a reader, its manifest, a README, a test, a fixture
ducter plugin check acme-notes          # what an install would refuse, before you install
ducter plugin check acme-notes --stream # runs the importer in Ducter's sandbox and says what it would bring in

check looks at a look’s manifest, its colours in both light and dark, and that every text is readable on its paper. For an importer it looks at the manifest, the file it runs, its icon (a PNG or SVG of at most 256 KB), the places it reads, the Ducter versions it says it works with, and the content hash a repository pins. A problem names the field to fix, such as app.name or run.

--stream runs the importer exactly as Ducter would, in the same sandbox with the same limits, with ~ meaning its fixture/ folder. Give a folder to use that instead: --stream ~/some-copy, or --stream ~ for your own home. Nothing is installed or brought in.

Every importer is written as ducter-plugin/1; a look is ducter-plugin/2. The importer’s manifest is described in Bring past conversations in.

check ends with one of these exit codes, so a script or an agent can follow it:

Code Means
0 Nothing to fix
1 Something to fix: a field, a file, a colour that’s too faint, or what the importer printed
2 Nothing was checked: no folder, or a manifest that can’t be read
3 The importer can’t run on this computer, because there is no sandbox here

Add --json for the same answer as data.

Make your own

To write a look or an importer yourself, check it and publish it from your own repository, see Make a plugin.

Make your own look

A look is two small files in a folder: ducter-plugin.json (its name and who made it) and theme.json (its colours for the light and the dark paper). Start one, check it, and watch it live while you change it:

ducter plugin new theme ./my-look     # writes a look that already passes
ducter plugin check ./my-look         # the same checks Ducter runs before it installs one
ducter plugin dev ./my-look           # wear it now, and again every time you save

ducter plugin dev runs on the computer where Ducter runs. It checks the folder first, then every open window (the Mac, the web and your phone) wears the look. Nothing is installed and the look you chose stays chosen. Each time you save, the windows change with it; if a save doesn’t pass (a colour that can’t be read, text too faint on its paper), the terminal says why and the last good version stays on. Settings › 插件 / Plugins shows 正在试本地外观 / Trying a local look with 停止 / Stop while it runs.

To stop, press Ctrl+C, run ducter plugin dev --stop from another terminal, or tap 停止 / Stop. Your own look comes back. When you’re happy with it, ducter plugin add ./my-look installs it.

Have my agent make one

Your own AI agent can write a plugin for you. Give it this one sentence and the address of Ducter’s plugin skill:

“Make me a Ducter plugin. Install nothing yourself — check it and I’ll tap install.”

https://ducter.ai/skills/ducter-plugin/SKILL.md (the skill page is coming soon with the other plugin kinds).