Is it possible to invoke play button using terminal? I want to control my media player (iTunes, Spotify, etc) using terminal. My goal was simply to trigger press on play/pause button using script. Is that possible?
You can control iTunes using AppleScript:

tell application "iTunes" to play


To run it directly from Terminal command line, you can use osascript:

osascript -e 'tell application "iTunes" to play'


To figure out what commands are available in iTunes, use the ScriptEditor app and open the dictionary of iTunes, see How do I find out the applescript commands available for a particular app?