Control AppleTV with terminal or web?
No, there is no such interface available for the default ATV2 shell, however you could install XBMC (jailbreaking required) and use XBMC API to control it. 

If you really want to control the default interface (now called AppleTV.app), you have two possible routes (both beyond the scope of this site and question):


Reverse engineer the protocol used in the remote app.
Reverse engineer the AppleTV.app and use some way (mobilesubstrate) to inject hooks for functions or whole network interface.