Plugins
Plugins configured in rewyyn.json(c) that expose a TUI component are loaded automatically by the CLI. To learn how
to build plugins, see Building plugins. You do not need to add the same package to cli.json. The CLI
gets the active plugin list from the connected Rewyyn server, so this also works when the server is remote.
Use cli.json for CLI-only plugins. These plugins run locally in the terminal and remain active when the CLI connects
to a remote server:
{
"plugins": [
"rewyyn.example",
"rewyyn.example@1.0.0",
"@example/rewyyn-tui",
"@example/rewyyn-tui@1.0.0",
"./plugins/status",
"../plugins/status",
"/home/user/plugins/status",
"file:///home/user/plugins/status"
]
}Entries are processed in order. Prefix an ID or wildcard with - to disable matching plugins:
{
"plugins": ["*", "-rewyyn.notifications", "-team.*"]
}Pass plugin options with the object form:
{
"plugins": [
{
"package": "@example/rewyyn-tui",
"options": {
"compact": true
}
}
]
}Rewyyn also discovers plugins under the global config directory and project .rewyyn directories. Each plugin uses
the same layout as a published package, with server and TUI entrypoints kept together.
<global-config>/plugins/status/index.ts
<global-config>/plugins/status/tui.ts
<project>/.rewyyn/plugins/status/index.ts
<project>/.rewyyn/plugins/status/tui.tsDiscovered plugins can import @rewyyn/plugin/tui directly; Rewyyn resolves the package at runtime. See
Building TUI plugins for examples.