This repository provides a default template for developing Matterbridge plugins.
If you like this project and find it useful, please consider giving it a star on GitHub at Matterbridge Plugin Template and sponsoring it.
- Dev Container support for instant development environment.
- Pre-configured TypeScript, ESLint, Prettier, Jest and Vitest.
- Example project structure for Accessory and Dynamic platforms.
- Ready for customization for your own plugin.
- The dev branch of Matterbridge is already build and installed into the Dev Container and linked to the plugin.
- The project has an already configured Jest / Vitest test unit (with 100% coverage) that you can expand while you add your own plugin logic.
- It has a workflow configured to run on push and pull request that build, lint and test the plugin on node 20, 22 and 24 with ubuntu, macOS and windows.
- It also has a workflow configured to publish on npm. Add your NPM_TOKEN to the repository secrets.
- Create a repository from this template using the template feature of GitHub.
- Clone it locally and open the cloned folder project with VS Code. If you have docker or docker desktop, just run
code .
. - When prompted, reopen in the devcontainer. VS Code will automatically build and start the development environment with all dependencies installed.
- Update the code and configuration files as needed for your plugin.
- Follow the instructions in the matterbridge README-DEV and comments in module.ts to implement your plugin logic.
- Docker Desktop or Docker Engine are required to use the Dev Container.
- Devcontainer works correctly on Linux, macOS, Windows, WSL2.
- The devcontainer provides Node.js, npm, TypeScript, ESLint, Prettier, Jest, Vitest and other tools and extensions pre-installed and configured.
- The devcontainer is optimized using named mounts for node_modules and matterbridge.
- You can run, build, and test your plugin directly inside the container.
- To open a terminal in the devcontainer, use the VS Code terminal after the container starts.
- All commands (npm, tsc, matterbridge etc.) will run inside the container environment.
- All the source files are on host.
- Since the dev container doesn't have network host and IPV6, is not possible to pair matterbridge from the Devcontainer but you can add your plugin to matterbridge and test it inside the devcontainer.
Refer to the Matterbridge documentation for other guidelines.