Once again: notifying of long-running cli commands’ completion, in Apple ecosystem
Once again I’m starting a long task in terminal and I don’t want to wait for it infront of the screen. I’ve already had
two options before: imessageme
and facetimeme
– two aliases for small cli scripts
that sends iMesasge to me and calls me (my iPhone was showing that I’m calling), which I was placing after a long-running task. Somehow
Facetime trick stopped working and iMessage was not notifying me on messages from myself anymore (probably treating them as readed).
So what I’ve eneded up now is a new script that creates a reminder in Reminder.app with immediate due date. This way you:
- Get a notification on all your Apple devices (Mac, iPhone, Apple Watch, AirPods?)
- Exploit common Reminders’ UX, like Remind Me in an Hour or Mark as Completed
- Have a list of such Reports
As an extension, I’ve even made a remind-job-done
shell function that can remind you when a shell job is finished, adding
the start time of the process, the time you asked to remind about it (Waited since …) and the success/failure designator.
Check the scripts at aleksandr-vin/macos-scripts.
Example
brew upgrade & remind-job-done
Then brew upgrade
is made a background job which is immediately put into foreground and waited for completion.
This is how you see notification on iPhone:
And on Apple Watch:
And in Reminders.app: