File Watcher Provider
The File Watcher provider monitors local files for changes. Each new line in a watched file becomes a message in the assigned channel. This makes it ideal for log files, shell script output, and text-based integrations.
Configuration
The File Watcher provider has the following settings:
| Setting | Description |
|---|---|
| Watched Paths | List of files to monitor for changes |
| Delete After Reading | Clear the file contents after processing |
Adding Watch Paths
Click the + button next to Watched Paths to open a Finder dialog where you can select the file to monitor. channelBar receives sandbox bookmark permissions automatically, so the selected file remains accessible across app restarts.
Multiple files can be monitored by a single channel — simply add additional paths as needed.
How It Works
- The file is read line by line. Each non-empty line becomes a separate message.
- Only new content is processed since the last change.
- With Delete After Reading enabled, the file is cleared after processing.
- The file does not need to exist initially — channelBar waits for creation.
- Maximum file size: 64 KB.
Examples
Send a message from a shell script by appending a line to the watched file:
echo "Backup completed: $(date)" >> ~/channelbar-inbox.txt
Note: Use >> (append) rather than > (overwrite) to avoid losing unprocessed content.
Activation
To enable the File Watcher provider for a channel:
- Open Settings → Channels
- Select the target channel
- Go to Providers
- Enable File Watcher
- Add one or more file paths