For documentation on developing modules, please see the website
To develop Companion itself (aka core Companion, i.e. this repo), start here
For core Companion:
yarn install
yarn devConnect to it at http://localhost:8000/
Optionally, in another terminal:
# Run front end in dev mode for auto-refresh
yarn dev:webuiConnect to it at http://localhost:5173/
A .env file in the root of the repository can be used to customise the dev environment. Copy .env.example to get started:
cp .env.example .envSee .env.example for descriptions of available settings.
Unit tests are written with Vitest.
# Run all tests
yarn test --run
# Run tests in watch mode
yarn testThe webui has a Storybook for developing and visually reviewing UI components in isolation.
yarn dev:storybookConnect to it at http://localhost:6006/
The project uses ESLint for linting and Prettier for formatting. Both are enforced via a pre-commit hook (husky + lint-staged), so code will be checked automatically before each commit.
To run them manually:
# Check for lint errors
yarn lint
# Format all files
yarn formatTypeScript types across all packages can be checked without running the full build:
yarn check-typesThe documentation is built with Docusaurus and lives in the docs/ package. The same content is bundled into Companion and published at https://companion.free.
yarn dev:docsConnect to it at http://localhost:4000/