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.
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.
| Capability | What you get | Copy this example | Reference |
|---|---|---|---|
| Commands and chords | a verb on the keyboard and in the palette; send_text types into the pane | paste-uptime | commands and send_text |
| Context-menu rows | the plugin's commands beside the selection | selection-tools | menu rows |
| Tab menu rows | the plugin's commands on a tab's own menu, under one Plugins entry; a pick acts on the clicked tab | none yet | tab menu rows |
| Button dialogs | a modal the user answers | pomodoro | dialogs |
| Input and pick dialogs | a text field or a one-of list | deploy-where | input and pick kinds |
| Chips in the chips band | a live chip the user can click | remote-chip | the band view's ctx |
| Side-panel views | rows of live content in the rail | clipboard-history | panel views |
| Panel fields | a text input in the rail | tasks-panel | panel fields |
| Panels | a titled group the user summons, floats, docks | deploy-panel | panels |
| Progress | a chip with a percentage and a cancel | deploy-progress | progress |
| Output channels | the plugin's own visible log | build-log | output channels |
| Shell profiles (manifest-only) | offered profiles on the Plugins page; nothing runs until you add one | ssh-profiles | profiles |
| Settings rows | typed rows on the Plugins page, values on every dispatch | toggle-greet | settings rows |
| Tab titles and chips | naming and decorating tabs | tab-titles-by-dir | script tab titles |
| Filling a tab | a tab's rows, wrap choice, and class in place of its title | tab-rows | filling a tab |
| Acting on tabs | open, select, close, rename, move, pin | tab-tools | acting on tabs |
| Terminal events | bell, title, child-exit, exit, focus | bell-notify | terminal events |
| State | memory that survives restarts | pomodoro | state |
| Clipboard | read and write the clipboard and the primary selection | clipboard-history | clipboard |
| Clipboard change | told on every text copy, by permission | clipboard-history | clipboard change |
| Link hooks | first say on a link opening: claim it, or refuse it with a verdict | link-guard | link events |
| Watching hovered links | the address under the pointer, by permission | none yet | link events |
| Styles | restyle what the host and plugins paint - the manifest alone can | accent-styles | the two sources |
| A band of your own | a docked strip at an edge | bottom-band | declaring 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.
Menu rows
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.