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
ctxobject 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
appobject 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
- Quick start: make a plugin from the template and run it on your server in a few minutes.
- Project layout: what every file in a plugin is for.
- 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 to | Read |
|---|---|
| Start small | Plugin-Workspaces |
| Run commands on hosts | Plugin-Docker |
| Add a sign in method | Plugin-SSO, Plugin-TOTP |
| Add an SSH auth type | Plugin-Vault |
| Offer a service to other plugins | Plugin-Snippets |
| Use other plugins' services | Plugin-Automations |
| Add a connection protocol | Plugin-Remote-Desktop |
Get help
Ask in the Discord. Bugs in the SDK go in the Termix repo.