Bitlash ( http://bitlash.net
) may be worth a look for the Arduino side of your project. It is an open source command interpreter that listens on the virtual serial port which is brought up when you plug the Arduino in via USB.
On the PC side, you can drive Bitlash (or any sketch on Arduino) by opening and writing to the serial port in your PC-side language of choice. You could develop your own a terminal emulator if the available ones don't suit your needs.