Mac: How to send text messages from the command line and shell scripts
Briefly

You can send text messages from the command line and shell scripts to phone numbers and email addresses, and the only restriction is that the contact has to be a known Messages/iMessage contact.
Here's a shell script to send a text message to a known phone number: ... a bit of AppleScript to send the message ...
Here's a shell script to send a text message to a known email address: ... send the message with a bit of AppleScript ...
Make your scripts executable with chmod +x. Run the script the first time, choose the correct option on the dialog that comes up to allow permission. Once done, send text messages from macOS command line and shell scripts.
Read at Alvinalexander
[
add
]
[
|
|
]