Question: I need to install tweaks' packages on an jailbroken iPhone via SSH. But apt-get is not included in mac command line tools. I've found that brew can be used, but it doesn't seem to work when ssh'ing iPhone. 

Tweaks are installed apt-get install com.author.thweakname

How do I execute it in mac Terminal?

Answer: 
`apt-get` is a Debian and Debian based tool for package management.

It will not run on the iPhone correctly without **major** efforts to modify the code and packages you are wanting to run/install
I used [fink](http://www.finkproject.org/) on MacOSX in the past as a package installer, but that is many versions of MacOSX ago so might not be available anymore?