Currently i'm working a lot on serverless projects and deploying a new service that has multiple lambda's or event a step function can be time consuming. In this case it was quite often for me to "forget" about the running deploy in the Terminal and get distracted by something else. Checking from time to time the progress is also not fun, so i started to think on how can i get notified about my script finish. After some investigation i found 2 solutions :
- Open iTerm
- Click on
Install Shell Integration
- After everything is done, before or while running your long running script (hello
sls deploy) press ⌥⌘ + A combination (
- Now you can put your terminal in background and check something else. When your script will finish, you will get a notification from iTerm
Now, if you, for some reason, don't like iTerm and using something else (like Intellij products terminal), then you can install noti - small script that will also notify your on command execution result.
Here's what you need to do :
- brew install noti
noti brew update
- Put your terminal away and noti will let you know when your command is done.
Both approaches requiers some additional actions to do in order to get notifications - in case of iTerm you will have to press
⌥⌘ + A everytime you want to "watch" command progress, and with
noti you will have to put
noti in front of your command.
Personally i think i will stick with iTerm feature for now, as pressing key combination is not hard and i don't have to modify my cli commands in order to get notified.