Equivalent of xdotool script to open lots of terminal tabs and do actions, on macbook

You could use iTerm2 a free and brilliant terminal and use its Python API

https://iterm2.com/python-api/

You could use AppleScript or JavaScript based script with the terminal app

List of all AppleScript commands for Terminal application

I would have to check, but there might be something in the new shortcuts app for MacOS . I will check

Update : shortcuts doesn’t have the actions for terminal other than run script.

Don’t forget you can do a lot from command line such as tmux to open multiple consoles or ssh connections, gnu parallel and many tools to to manage tmux sessions.