Connect to remote TeamViewer computer desktop via MacOS terminal command line
To connect to Teamviewer through the command line in MacOS, pass the arguments as follow (substitute xxxxxxxx with the target id, and yyyy with the target password:

/Applications/TeamViewer.app/Contents/MacOS/TeamViewer -i xxxxxxxx -P yyyy -ac 1





  -ac options:
  
  
  0: full access
  1: confirm all
  2: view and show
  3: custom
  9: undefined
  




The first time you run the command, you may be asked to allow the Terminal in your System Preferences > Security. (as well as TeamViewer itself). Just follow and enter the command again.