It's trivial to open applications from the terminal in OS X:
open -a Twitter.app.
Is there some special terminal command that will hide an open application (essentially the equivalent of typing ⌘+H from inside the application)?
Something like this is a pretty rough start.
Here is a slightly better example
Which you run with