-
Notifications
You must be signed in to change notification settings - Fork 21
Home
So, you want to develop a module for Companion? Welcome! This wiki describes what you need to know and do to make a beautiful module being able to control your favorite gear with Companion.
As of Companion 3.0, you no longer need a full development environment to make modules. You only need a full environment if you wish to edit the code at the core of Companion. You do however still need some developer tools
Companion is written in Javascript/Typescript and uses the node.js runtime. That means you should be at least a little bit familiar with Javascript. Companion, Javascript and Node.js are platform independent, so you can develop on Windows, macOS or Linux and the code you write will be able to run on all three platforms.
There are many ways of doing this. We recommend using a version manager, to allow for easily updating and switching between versions.
In the past, we recommended using n, but that requires a version node.js to be installed first.
Our recommendation is to use fnm It is fast and cross-platform. You are free to install any other way you wish, but you will need to figure out the correct commands or ensure you have the right version at each point.
Once you have installed fnm execute the following in a terminal, to install node.js v22 and make it be the default.
fnm install 22
fnm use 22
fnm default 22
corepack enable
Some older modules uses node v18 instead of v22, but are encouraged to update to v22. Sometimes updating the node version can introduce new bugs, but staying on older versions makes development harder as tools drop support for those versions. At some point, Companion will require modules to be node v22 (or perhaps a newer version)
To edit the source code or write new code you can use any text editor you like, but there are many editors which are made especially for developing computer code or even better especially for JavaScript. If you have no idea you should try the Visual Studio Code editor.
You will also need to install git, which is what we use with to manage, upload and download the sourcecode with GitHub. On macos this available from homebrew.
If you have never used git or github before, have a read of our Git crashcourse.
Some common free git gui tools:
- VSCode has builtin support for git. This has the benefit of being within your code editor, but can be a bit more awkward to use for more advanced tasks.
- Github Desktop is a free desktop tool made by Github that is user friendly
- SmartGit is a paid tool, but with a free tier for opensource. This is a more powerful tool than the others, and can be a bit less user friendly.
It is now possible to develop modules against any standard release or beta build of Companion!
You can download and install a recent version from the website
- Create a
companion-module-devfolder somewhere on your computer. You can call it whatever you like. - If you are working on an existing module, clone it inside this folder using your prefered git tool.
- If you are making a new module, then clone the template module, available in TypeScript or Javascript, to an appropriately named folder inside of
companion-module-dev. If you are starting a new module we encourage you to use Typescript but acknowledge that it isn't for everyone, so fully support Javascript too!
Once you have the companion launcher open, click the cog in the top right. In versions prior to v4.1 this will reveal a 'Developer modules path' field. Starting in v4.1 it will open up a settings window in which you can set the path. Set it to the companion-module-dev folder you created earlier.

Companion will load any modules it finds from that folder when starting, and will restart itself whenever a file inside that folder is changed.
Starting with v4.0, note that your new dev module will show up in the Connections page but not in the Modules page, since it is not yet part of the official set of Companion modules.
You are now ready to start developing your module.
You should notice that whenever you save a file inside your companion-module-dev folder, companion will restart itself.
If it does not, or you are having issues getting your module to load in then please reach out on slack and we will be happy to assist you in getting started.
Next: Module development 101
Getting Started
- Home
- Module development 101
- Git crashcourse
- Upgrading a module built for Companion 2.x
- Companion module library versioning
- Releasing your module
Development
- File Structure
- manifest.json
- Logging
- Module debugging
- Module packaging
- Actions
- Feedbacks
- Presets
- Input Field Types
- Module configuration
- Upgrade scripts
- Variables
- HTTP Handler
Code quality
Advanced functionality