Desktop Notification When Command Finished (MacOS)

If you have some one-off command you’re running a lot and it takes a long time to complete, you can use the native notification system in MacOS via command-line Applescript access to send yourself a notification once the command is done:

osascript -e 'display notification "DONE" with title "Command Done"'

I setup a bash alias so I can easily append this whenever I need:

alias notify_me="osascript -e 'display notification \"DONE\" with title \"Command Done\"'"

And then…

%d bloggers like this: