Plugins
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, or Plugins in its … menu, lists what's installed, and a new manifest shows up the next time you open it.
Two actions run today. The ⬇ .cdx button on a graveyard card harvests that dead agent's session into a .cdx package, using context-delight's cdx-mcp. The savings face of the usage card shows lean-ctx's token savings, 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.
Manifests
Terminal Delight reads every plugin.json one level under plugins/ in its config folder, $XDG_CONFIG_HOME/terminal-delight or ~/.config/terminal-delight. It reads them again each time it needs the list, so there is nothing to restart.1
| Key | Type | Default | Meaning |
|---|---|---|---|
name | string, required | The plugin's id. A plugin named context-delight or leanctx-savings replaces the built-in one. | |
command | string, required | The program to start. | |
args | list of strings | [] | Its arguments. |
env | object of strings | {} | Extra environment for it. |
version | string | "0" | Shown as v<version>. |
description | string | "" | Shown in the panel. |
scope | string | "agent" | agent or global. |
actions | list | [] | Each {tool, label, surfaces}: the MCP tool, its label (the tool's name if left out), and where it belongs, among agent, graveyard and global (global if left out). |
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. A plugin's JSON-RPC error shows as plugin error <code>: <message>, and a program that won't start as could not launch <command>: ….1
The built-in two#
| Plugin | Found when | Action |
|---|---|---|
context-delight | cdx-mcp is on your PATH, in ~/.local/bin or in ~/.cargo/bin | ⬇ context in the panel, ⬇ .cdx on a graveyard card: write_package with {target, format: "cdx", out, redact: true}, writing ~/.local/share/context-delight/<session>.cdx |
leanctx-savings | leanctx-mcp is on your PATH, in ~/.local/bin or in ~/.cargo/bin | </> savings: savings, drawn on the usage card's savings face. The </> savings button on the agent wall opens the same face. |
Run from a source checkout, Terminal Delight also finds the repository's own plugins/leanctx-mcp/leanctx-mcp. scripts/install-plugins.sh copies the plugin programs under plugins/ into ~/.local/bin; their manifests stay where they are.
The agent wall has no button or menu row of its own; Ctrl+Shift+A opens it, and the usage card's savings face is the usual way to the savings.
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-sendplugin, which pulls other terminals' windows into Terminal Delight, isn't installed where Terminal Delight looks for manifests. Copy itsplugin.jsoninto place to list it.
What would prove this wrong#
Each action starts one plugin process and ends it when the call returns or times out. A plugin process still running after that, or a call that waits longer than ten seconds for one answer, is a bug.
Sources
- Discovery, the manifest and the client: plugins.rs; the strings: lang/parts.rs; the bundled plugins: plugins/.