Stretchly Watcher is an extension for Stretchly that synchronizes your break notifications directly to your iPhone (or other mobile devices).
It runs seamlessly as a background macOS service that watches Stretchly's log files and forwards break events to a ntfy topic. This ensures you receive push notifications on your phone whenever it's time for a break, even if you've stepped away from your computer.
- macOS
- Python 3
- Stretchly installed and running
- A ntfy topic setup:
- Create a topic from
https://ntfy.sh/in advance. - Install the ntfy app on your mobile device or desktop and subscribe to listen to that topic.
- (The script defaults to
https://ntfy.sh/stretchly-watcher-defaultif not customized)
- Create a topic from
-
Clone the repository
git clone <repo-url> stretchly-watcher cd stretchly-watcher
-
Configure (optional)
By default, the watcher monitors
~/Library/Logs/Stretchly/main.logand notifieshttps://ntfy.sh/stretchly-watcher-default. Override with environment variables:export STRETCHLY_LOG_PATH="/path/to/stretchly.log" export STRETCHLY_NTFY_URL="https://ntfy.sh/your-topic"
-
Make scripts executable
chmod +x bin/install.sh bin/uninstall.sh
-
Run the installer
./bin/install.sh
This will:
- Detect your Python 3 interpreter
- Generate a launchd plist in
~/Library/LaunchAgents/ - Load and start the service via
launchctl
-
Verify the service
launchctl list | grep stretchly-watcherYou should see the service in the list with a PID (non-zero in the second column).
./bin/uninstall.shThis will:
- Unload the service from launchd
- Remove the plist file from
~/Library/LaunchAgents/
Log files in ~/Library/Logs/Stretchly/ are preserved and can be removed manually if desired.
- Watcher stdout:
~/Library/Logs/Stretchly/watcher_stdout.log - Watcher stderr:
~/Library/Logs/Stretchly/watcher_stderr.log - Stretchly log (watched):
~/Library/Logs/Stretchly/main.log(or custom path viaSTRETCHLY_LOG_PATH)
The watcher tails Stretchly's log file, matching lines against known break-event patterns (notification shown, break window loaded, break finished). Each matched event is forwarded as a push notification to the configured ntfy URL.