Webessence

To login: username and password both are test.

Make sure you focus the console! Use ESC to toggle maximize terminal screen.

Enable javascript to see this demo.

This is a Javascript terminal client, tested in Firefox 4, IE 7/8/9, Opera, Chrome and Safari. Commands you can use:

  • ls (also with -l and -a options)
  • cd
  • cp
  • mv
  • cat
  • rmdir
  • rm
  • vi (CTRL + S to save it, CTRL + Q to close the vi editor without saving)
  • whoami
  • pwd
  • clear (clears history)
  • cls (clears screen)
  • with the UP and DOWN keys you can walk through the history
  • exit to logoff

Download

You can download the terminal package.

Reference

To create a Terminal from a DIV element with the ID "terminal":

var terminal = new Terminal(document.getElementById("terminal"));
terminal.setInputLine();

To put a Terminal instance in CommandLine mode:

Terminal.setCommandLineMode(terminal, {
	"prompt" : ":-)",
	"callback" : function(cmd) {
		this.setOutput([cmd]);
		this.callbackEnded();
	}
});

The terminal can also be set to Bash mode. This mode can execute AJAX commands to a backend script.

Terminal.setBashMode(terminal, {
	"prompt" : ":-)",
	"scriptPath" : "/path/to/terminal.php"
});
terminal.exec("hello");

Example of combining the keyhandling and modes to a terminal that can switch between default, CommandLine and Vi mode by pressing the ESC key. See source for the code.

Enable javascript to see this demo.