Skip to main content

Build a plugin

Every feature in Termix past hosts, credentials, users and sharing is a plugin. The SSH terminal is a plugin. So are the file manager, Docker, single sign-on and the rest. A plugin you write has the same tools they do.

A plugin is:

  • A manifest, manifest.json. It says what the plugin is, what it adds and what it is allowed to do.
  • A backend, run inside the Termix server. It gets a ctx object with everything it may use: its own tables, settings, HTTP routes, SSH connections to hosts and more.
  • A frontend, run in the browser. It gets an app object to add tabs, panels, buttons and settings to the UI.

Both halves only talk to Termix through the plugin SDK, @termix-ssh/plugin-sdk. They never import Termix's own code.

Start here​

  1. Quick start: make a plugin from the template and run it on your server in a few minutes.
  2. Project layout: what every file in a plugin is for.
  3. How it works: capabilities, permissions, the lifecycle and what Termix does and does not protect.

Then pick what your plugin needs from Building, and read Shipping when you are ready to release it.

Look at real plugins​

All 36 official plugins are open source and built the same way. When the docs don't answer something, read one that does what you want:

You want toRead
Start smallPlugin-Workspaces
Run commands on hostsPlugin-Docker
Add a sign in methodPlugin-SSO, Plugin-TOTP
Add an SSH auth typePlugin-Vault
Offer a service to other pluginsPlugin-Snippets
Use other plugins' servicesPlugin-Automations
Add a connection protocolPlugin-Remote-Desktop

Get help​

Ask in the Discord. Bugs in the SDK go in the Termix repo.