If you have a use case where you want to trigger a Notification Alert on your Mac using the terminal, you can do that using the osascript display notification command,
Example:osascript -e 'display notification "Message!" with title "Title"'
Output:

Trigger Notification Center alert message using macOS Terminal Command
You can also add subtitle to the notification using subtitle, example,

Notification with Subtitle
% osascript -e '
display notification "This is a test message!"
with title "This is test Title"
subtitle "This is subtitle"'
More Posts related to MacOS,
- How to find files taking up space on your Mac
- How to open new tabs macOS Terminal
- Encode or Decode Base64 String using Mac Terminal Command
- How to take a screenshot on a Mac? (updated for macOS Monterey 2022)
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to know your Mac Screen Resolution?
- How to make macOS Terminal window Transparent (or Opaque)
- [macOS] Change homepage Macbook Safari Browser
- Cut, Copy and Paste keyboard commands on mac
- Shutdown Mac Terminal Command
- Zsh Shell: Custom alias that you may find useful
- How to uninstall GarageBand from Mac
- How to Refresh Mac Desktop
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Right Click on Mac Desktop?
- How to remove app from Dock when closed [macOS Big Sur]
- How to display directory tree in Mac Terminal
- [Eclipse] Locate Preferences in macOS
- How to save webpage as pdf using macOS Safari
- Set Python 3.8 as a default python version on macOS
- 10 Beginners Commands for macOS Terminal Usage
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- [Solution] macOS Big Sur Installation: There is not enough free space, Additional Space Required
- How to search (find) in macOS Terminal Console Text
- How to come out of dquote prompt in Terminal - macOS/Linux
More Posts:
- Rounded Images in Bootstrap framework - Bootstrap
- How to check zsh installed version using terminal - MacOS
- Disable Back Button in Android Programmatically - Android
- Android : Neither user 10085 nor current process has android.permission.ACCESS_NETWORK_STATE - Android
- How to kill service running on a port on Ubuntu Linux - Ubuntu
- Add scroll to div element in HTML Css - CSS
- Google Webmaster : An error has occurred. Please try again later - Google
- The selected device is incompatible : Android Studio - Android-Studio