This section explains everything a user needs to install, configure, operate, and remove the app.
Create the file here:
~/.macmic.env
Example:
MQTT_HOST=192.168.1.6
MQTT_PORT=1883
MQTT_TOPIC=home/macbook/mic
MQTT_USERNAME=your_mqtt_username
MQTT_PASSWORD=your_mqtt_passwordNotes:
-
The file must be named .macmic.env
-
It must live in your home directory
-
Credentials are read at startup
Recommended permissions:
chmod 600 ~/.macmic.envIdeally before this step, you will already have your env file created.
Run the installer script:
curl -fsSL https://raw.githubusercontent.com/rammodhvadia/macMicMonitor/main/install.sh | bashWhat this does:
-
Downloads the latest release binary from GitHub
-
Installs it to ~/.local/bin/macmicSwift
-
Installs a LaunchAgent
-
Starts the service immediately
-
Configures it to start automatically at login
-
If ~/.macmic.env does not exist, a template file will be created and you will be prompted to edit it.
Stop the app
launchctl unload ~/Library/LaunchAgents/com.ram.macmicSwift.plistStart the app
launchctl load ~/Library/LaunchAgents/com.ram.macmicSwift.plistRestart the app
launchctl unload ~/Library/LaunchAgents/com.ram.macmicSwift.plist
launchctl load ~/Library/LaunchAgents/com.ram.macmicSwift.plist# Stop and remove LaunchAgent
launchctl unload ~/Library/LaunchAgents/com.ram.macmicSwift.plist
rm ~/Library/LaunchAgents/com.ram.macmicSwift.plist
# Remove binary
rm ~/.local/bin/macmicSwift
# Remove config (optional)
rm ~/.macmic.env
rm ~/.macmic.env.example-
macOS may prompt for microphone access on first run — this must be allowed
-
The app runs silently in the background (no UI)
-
Only Apple Silicon Macs are supported
-
Restart the app after changing .macmic.env
-
Home Assistant will not create duplicate devices on restarts (stable MQTT discovery IDs)