I have a few layouts I rebuild by hand again and again: one window for logs, one for a build, a few tabs for SSH. Terminal can remember the whole arrangement.
Set the windows up the way you want, with the right profile and tabs in each. Then choose Window > Save Windows as Group and give the group a name. The window settings and tabs are saved with it.
The dialog has two options:
- Restore all commands brings back remote connections and commands that are safe to run without confirmation.
- Use window group when Terminal starts opens these windows every time you launch Terminal.
To open a group later, choose Window > Open Window Group and pick its name from the list.
Groups are managed in Terminal > Settings > Window Groups. Select a group there and click the Remove button to delete it. The Action pop-up menu there has Import and Export, or you can drag a group between the list and Finder. Group files end in .terminal, so you can copy a layout to another Mac.
I’d start with the startup option off. A group that opens by itself and runs remote connections every time you start Terminal is something you want to pick on purpose.
One caveat: Apple says “Restore all commands” only restores commands that are safe to run without confirmation, Check each tab after you open the group.
Further reading: Use Terminal window groups on Mac – Apple Support
Going deeper: Guide: keep your Mac apps in a Brewfile, so a new MacBook is one command away