Skip to content

File Structure

bryce edited this page Oct 10, 2024 · 4 revisions

When creating a new module, we recommend either using one of the templates, available as JavaScript or TypeScript, or one of our recommended reference modules:

Below are the minimum files necessary to create a control module for Companion. You can create subfolders and other support Javascript files as needed.

.gitignore

This is a standard Git file to tell files/folders to be excluded from Git version control. node_modules/ should always be included in the .gitignore.

index.js

This main execution script for the module. This can be called something else, as long as the main field in companion/manifest.json is updated to match

companion/HELP.md

A structured 'Help' document that is used within Companion to help users understand the module's capabilities and configure their instance.

companion/manifest.json

Provides information to Companion about the module. See manifest.json

LICENSE

Companion is an MIT licensed project. All modules released with the project must also be MIT.

In the future it might be possible to use different licenses for modules, but that is not yet certain.

Consult the Companion team if you with to incorporate a dependency that does not have an MIT license.

package.json

This is a standard node.js file to tell it about your project. It is required to be able to install dependencies to your module such as @companion-module/base

README.md

This file should include any relevant developer documentation that the Companion Core and Module Development teams should be aware of, as well as any helpful information for people who wish to fork and contribute. It is only shown on github and when editing the module, so can be reasonably technical.

Clone this wiki locally