If You just want to send the output (Not Live) of a command line app as a snapshot then probably Pipe-ing | the output to create a .txt file in the website folder of your server would work for that.
If You want to view and control the commandline application. You probably want to look into Socket Programming, or set up an SSH connection, maybe there is a web based telnet client plugin like Putty for browsers?