Plugins

Brief

Terminal Delight is an MCP client as well as a server. A plugin is a small program that speaks MCP over stdin and stdout. Terminal Delight finds it from a manifest, starts it when you use one of its actions, and stops it when the call returns.

To install one, put a plugin.json naming its command in ~/.config/terminal-delight/plugins/<name>/. The 🧩 button in the footer lists what's installed, and a new manifest shows up the next time you open it.

Two actions run today. ⬇ context harvests a finished agent's session into a .cdx package, from the agent wall or the graveyard, using context-delight's cdx-mcp. </> savings shows lean-ctx's token savings on the usage card, using leanctx-mcp. The panel lists any other plugin's actions, but can't run them yet.

Technical has the manifest format and how a call is made.

Technical

Manifests

KeyTypeDefaultMeaning
namestring, requiredThe plugin's id. A plugin named context-delight or leanctx-savings replaces the built-in one.
commandstring, requiredThe program to start.
argslist of strings[]Its arguments.
envobject of strings{}Extra environment for it.
versionstring"0"Shown as v<version>.
descriptionstring""Shown in the panel.
scopestring"agent"agent or global.
actionslist[]Each {tool, label, surfaces}: the MCP tool, its label, and where it belongs, among agent, graveyard and global.

A manifest that is not valid JSON, or has no name or command, is skipped without a word.

{
  "name": "leanctx-savings",
  "version": "0.1.0",
  "command": "leanctx-mcp",
  "scope": "global",
  "actions": [{ "tool": "savings", "label": "</> savings", "surfaces": ["global", "agent"] }]
}

How a call is made#

Terminal Delight starts the command with stdin and stdout piped and stderr discarded, sends initialize (protocol 2024-11-05, client terminal-delight), then notifications/initialized, then one tools/call, and reads the text of the result. Each request has ten seconds: plugin timed out after 10s. The process is ended when the call is done.

The built-in two#

PluginFound whenAction
context-delightcdx-mcp is on your PATH, in ~/.local/bin or in ~/.cargo/bin⬇ context: write_package with {target, format: "cdx", redact: true}, writing ~/.local/share/context-delight/<session>.cdx
leanctx-savingsleanctx-mcp is on your PATH, in ~/.local/bin or in ~/.cargo/bin</> savings: savings, drawn on the usage card

From a source checkout, scripts/install-plugins.sh copies the plugin programs under plugins/ into ~/.local/bin. It copies programs, not manifests.

Not yet#

  • Only the two built-in actions run. A third plugin's actions are listed in the panel but have nothing to run them.
  • The repository's td-send plugin, which pulls other terminals' windows into Terminal Delight, isn't installed where Terminal Delight looks for manifests. Copy its plugin.json into place to list it.

Sources

  1. Discovery, the manifest and the client: plugins.rs; the bundled plugins: plugins/.