Skip to main content

Plugins

A DropTerm plugin is a directory under the config dir's plugins/, carrying one Lua script and one optional manifest. An installed build's dir is ~/.config/io.github.l1br3_io.dropterm/plugins/ on Linux and %APPDATA%\io.github.l1br3_io.dropterm\plugins\ on Windows. A dev-identity build shares no files with it: ~/.config/io.github.l1br3_io.dropterm.Dev/plugins/ on Linux, or %APPDATA%\io.github.l1br3_io.dropterm.Dev\plugins\ on Windows. Both share one layout:

plugins/
uptime-helpers/
plugin.lua # the script - what runs
plugin.json # the manifest - what the host advertises without running anything

The setup wizard's plugins page names it (settings).

The directory's name is the plugin's id: a lowercase slug - letters, digits, hyphens, up to 64 characters. It is the persistent key everywhere the plugin is named: log lines, settings grouping, and the id a command binds under. A manifest "name" changes the display name only, never the id.

The layout is the format: a loose .lua file dropped directly in plugins/ is skipped with one log line - plugins are directories - and a non-slug directory (say Uptime or my_plugin) is skipped the same way. Deeper nesting is ignored. A directory with a script but no manifest still loads as scripts always did: it advertises nothing, and the log names the manifest it could have declared.

info

You don't have to write the two files yourself: describe the plugin you want to an AI assistant, and use the kit as described in Authoring with the kit.

A plugin's life​

From folder to running script:

What a plugin can do​

The table is the contract's whole surface, one row each: what you get, an example to copy from the gallery, and the reference that pins it. Each example is a working plugin: copy its folder into plugins/ and it runs, or let plugin install do the copying, checking the plugin first and saying what it will run. Rows marked manifest-only need no script; drawn portraits of the first examples live in the gallery on this site.

CapabilityWhat you getCopy this exampleReference
Commands and chordsa verb on the keyboard and in the palette; send_text types into the panepaste-uptimecommands and send_text
Context-menu rowsthe plugin's commands beside the selectionselection-toolsmenu rows
Tab menu rowsthe plugin's commands on a tab's own menu, under one Plugins entry; a pick acts on the clicked tabnone yettab menu rows
Button dialogsa modal the user answerspomodorodialogs
Input and pick dialogsa text field or a one-of listdeploy-whereinput and pick kinds
Chips in the chips banda live chip the user can clickremote-chipthe band view's ctx
Side-panel viewsrows of live content in the railclipboard-historypanel views
Panel fieldsa text input in the railtasks-panelpanel fields
Panelsa titled group the user summons, floats, docksdeploy-panelpanels
Progressa chip with a percentage and a canceldeploy-progressprogress
Output channelsthe plugin's own visible logbuild-logoutput channels
Shell profiles (manifest-only)offered profiles on the Plugins page; nothing runs until you add onessh-profilesprofiles
Settings rowstyped rows on the Plugins page, values on every dispatchtoggle-greetsettings rows
Tab titles and chipsnaming and decorating tabstab-titles-by-dirscript tab titles
Filling a taba tab's rows, wrap choice, and class in place of its titletab-rowsfilling a tab
Acting on tabsopen, select, close, rename, move, pintab-toolsacting on tabs
Terminal eventsbell, title, child-exit, exit, focusbell-notifyterminal events
Statememory that survives restartspomodorostate
Clipboardread and write the clipboard and the primary selectionclipboard-historyclipboard
Clipboard changetold on every text copy, by permissionclipboard-historyclipboard change
Link hooksfirst say on a link opening: claim it, or refuse it with a verdictlink-guardlink events
Watching hovered linksthe address under the pointer, by permissionnone yetlink events
Stylesrestyle what the host and plugins paint - the manifest alone canaccent-stylesthe two sources
A band of your owna docked strip at an edgebottom-banddeclaring a band

Two facts cut across every row: edits under plugins/ hot-reload in place (timeouts and reloads), and none of this is a sandbox (the trust model).

One surface is absent on purpose: suggestions. The ghost text and the completions menu stay built in, and completions for your own commands go in completions.toml beside the config (the completions data file).

A profile scopes the per-tab rows: its plugins list names the plugins whose tab-facing output reaches that profile's tabs: tab titles and chips, terminal events, script commands, context-menu rows, and tab-menu rows (profiles). With the list unset, the profile runs every plugin. The list is read at every dispatch, so an edit holds from the next one, with no respawn. Whatever the list says, the app-wide surfaces stay shared: panels, rail sections, bands, styles, dialogs, output channels, and plugin settings. The keybind editor lists every command; a chord bound to a command the active tab's profile leaves out does nothing.

Authoring a plugin with the kit​

Writing one from scratch - or handing it to an agent - starts at the plugin kit: the loop, the offline verbs, and the validator's bar are on Authoring with the kit.

Authoring with a chat model​

A chat-only model writes the same two files with you as its hands; the prompt carrying the whole contract is on Authoring with a chat model.

The trust model, stated plainly​

A plugin is your own config executing as you, with the complete Lua 5.4 standard library - io, os, everything. There is no sandbox and none is claimed: it can read and write your files, spawn processes, and block. Treat a plugin like a shell rc file. The timeout machinery is an escape hatch for runaway scripts, not a security boundary.

The same plainness applies to manifests and dialogs: a plugin can advertise commands and dialogs that look exactly like DropTerm's own - read what asks before you answer.

The manifest​

plugin.json declares what the host can say about the plugin without running its script: The manifest.

The plugin's declared commands on the terminal's context menu, above "Settings…": Menu rows.

Tab menu rows​

The plugin's declared commands on a tab's own right-click menu, under one Plugins entry: Tab menu rows.

Settings rows​

Typed rows on Settings' Plugins page, their values on every dispatch: Settings rows.

Profiles​

Shell profiles the plugin offers - listed on the Plugins page, and nothing runs until you add one: Profiles.

Activation​

The events that load the script, from lazy to on_startup: Activation.

Permissions​

What a plugin asks to be told - the clipboard, and the links you hover: Permissions.

Panels​

The Panel a plugin groups its sections into, one palette row each: Panels.

Settings in ctx​

Every dispatch carries the plugin's current settings as a Lua table on the ctx: Settings in ctx.

The runtime​

Inside a script, require('dropterm') yields the bus port: on, emit, and the log namespace: The runtime.

Terminal events​

The terminal's own life reaches the bus in seven events, bell to focus: Terminal events.

Typed answers​

Every slot's answer is one plain string; the typed-answers contract adds styled spans, additive-only: Typed answers.

Timeouts and reloads​

Every unit of Lua work runs under a soft bound and a hard cap, and editing plugins/ hot-reloads: Timeouts and reloads.

Dialogs​

A script can open a modal dialog - the command palette's shape, one live seat: Dialogs.

Input and pick kinds​

The two kinds that ask for an answer, a text field or a single-select list: Input and pick kinds.

Panel views​

Rows of live content docked into the side rails, updated on every refresh: Panel views.

Panel fields​

A text input in the rail, its value back on the plugin's bus with every change: Panel fields.

Commands and send_text​

The plugin verbs' calling conventions - what a handler's dispatch carries, and where send_text lands: Commands and send_text.

Output channels​

The plugin's own visible log, below the views: Output channels.

Progress​

A chip with a percentage and a cancel, for the plugin's own jobs: Progress.

State​

A plugin's own key-value store, surviving reloads and restarts: State.

Clipboard change​

Told on every text copy, to the plugins that declare the permission: Clipboard change.