This guide walks you through cloning the CollaboKeys repository, installing dependencies, compiling the native macOS keyboard helper, and running or packaging the application. By the end you will have a working development environment and an understanding of all available run modes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tinkerer9/CollaboKeys/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following are available on your Mac:- Node.js (LTS recommended) — nodejs.org
- npm — bundled with Node.js
- macOS — the server and native helper are macOS-only; Linux and Windows are not supported
- clang — required to compile
helper.c; ships with Xcode Command Line Tools
Install the Xcode Command Line Tools by running
xcode-select --install in Terminal if you don’t already have them. This provides both clang and the ApplicationServices framework headers needed to compile the keyboard helper.Setup
Install Node.js dependencies
package.json, including socket.io, winston, electron, and electron-builder.Compile the native keyboard helper
The keyboard emulation layer relies on a native C binary (This runs the following The flags produce a universal binary that runs natively on both Apple Silicon and Intel Macs. The output binary is placed at
src/emulate/helper) that calls macOS CGEventPost. You must compile it before running CollaboKeys for the first time:clang command internally:src/emulate/helper.Grant Accessibility permission
The first time you run CollaboKeys, macOS will prompt you to grant Accessibility permission so the app can emulate keyboard events system-wide. Click Open System Settings and enable CollaboKeys (or the Terminal entry, when running
npm test) in Privacy & Security → Accessibility.Running CollaboKeys
Once setup is complete, you have three ways to run the application.npm start — Full Electron app
- Shows the splash screen while the server starts
- Opens the admin panel automatically in the Electron window
- Prevents display sleep (configurable in
config.json) - Prompts for Accessibility permission if not already granted
npm test — Headless Node.js server
node src/server.js directly — no Electron, no window, no splash screen. The server starts and prints its URI to the terminal. All CLI console commands work normally. This mode is useful for development and automated testing since it starts faster and has no UI dependencies.
npm run build — Package as macOS app
npm run compile first (recompiling the native helper), then runs electron-builder to package the app. The output is placed in the dist/ folder and includes:
- A
.appbundle - A
.dmgdisk image for distribution
npm run release — Build and publish
npm run build but passes --publish always to electron-builder, which publishes the built artifacts to GitHub Releases.
electron-builder Configuration
The packaging behaviour is defined inelectron-builder.yml:
appIdis set tocom.collabokeys.app.iconis loaded fromimages/icon.icns.- The target is
dmg, producing a macOS disk image. categoryispublic.app-category.utilities.identity: nulldisables code signing — the app is not signed or notarized through Apple’s Developer Program. See the Security page for implications.- The compiled native helper is bundled as an
extraResource: it is copied fromsrc/emulate/helperto{app.app}/Contents/Resources/helperat build time.
Packaged vs. development helper path
keyboard.js uses Variables.electronPackaged (set from app.isPackaged in main.js) to resolve the correct path to the helper binary at runtime:
keyboard.js code works in both npm start (development, reads from src/emulate/helper) and a packaged .app (reads from the bundled resources/helper).
After building a
.dmg, end users who download it will see a macOS Gatekeeper warning because the app is unsigned. They can remove the quarantine flag with: