Here is an suggestion how it can work.
Look at the unofficial "google shell" and other similar approaches.
http://goosh.org/
http://code.google.com/p/web-shell/
http://hotwire-shell.org/
-E