Skip to content
jquery.terminal is a jQuery plugin which displays an interactive terminal in your pages.
Branch: master
Clone or download
KoltesDigital Adds built-in listener jsonrpc.
Adds an example jsonrpc.
Adds the command sum.
Latest commit 862e989 Oct 11, 2011
Type Name Latest commit message Commit time
Failed to load latest commit information.
jquery.terminal.css Fixes missing style with non-fullscreen terminal. Oct 10, 2011


jquery.terminal is a jQuery plugin which displays an interactive terminal in your pages.

It is not a SSH or Linux terminal! See Anyterm or Ajaxterm for that. Instead, jquery.terminal allows you to use custom commands.

I wrote this plugin to easily communicate with my systems without building HTML interfaces. And I wouldn't recommend you to use it as public front-end: the purpose of this plugin is to build administration interfaces.

Even if you don't have this need, you may still like this geeky stuff.



Add custom commands with listeners.

The default style displays white texts on black background, you may change it either by editing jquery.terminal.css (global change) or by adding CSS in your page.

Command flow and operators

Command flow is the root concept of the terminal. Arguments are values given to a command, which in return gives output values.

Operators bind commands together, manipulating arguments and outputs of each two operands. Each operator has its own way to execute commands.

Context-aware completion

At any moment, press TAB and you will see suggestions which fit well in the context.

Handles asynchronous requests

Commands can give result either synchronously or asynchronously, which comes in handy when they deal with AJAX requests. Works for completion too!

Interfaceable with other jQuery plugins

With the jQuery cookie plugin, the command history and variables will be automatically saved and restored. You may need clear to erase these variables.

The jQuery JSON RPC plugin provides a built-in listener jsonrpc to easily call server-side functions.

Simply include the files before jquery.terminal.js and that's it.

Getting started

Try the demo online!

The examples directory contains some examples:

The wiki contains a lot of additional information. You may be interested in reading:



  • Fixes magic sequences escape.
  • Fixes an error with search commands in GitHub example (#1).
  • Fixes a missing style with non-fullscreen terminals.
  • Fixes mousescroll event propagation (#2, #3).
  • Adds an example of non-fullscreen terminal.
  • Adds built-in listener command.
  • Changes arrow style (#2).
  • Fixes input problem on WebKit when selecting string (#3).
  • Adds built-in listener jsonrpc when jQuery JSON RPC is available.
  • Adds an example jsonrpc.
  • Adds the command sum.


  • Adds action call: $().terminal(string action, ...).
  • Replaces execution call with action call execute.
  • Adds action calls addListeners, removeListeners and options.
  • Adds listeners and variables to the options.


  • Fixes a compatibility bug with Internet Explorer and Opera.


  • Changes position magic sequence.
  • Adds $LAST variable.
  • Attaches event handlers to prompt and welcome message.
  • Adds help link in example simple.html.


  • Embeds caret plugin, no jquery.caret.js file to include anymore.
  • Embeds $.getJSONP.
  • Adds links in help function.
  • Puts the links in orange by default.
  • popup option can be set to null to never show popup.
  • Fixes scroll, which now works only if the cursor is over the terminal.


Considered as the first version, you don't want to see version 1 :)


Warm thanks to shitwizard improving the plugin.

Refer to links to issues within the changelog or commit messages.


Licensed under a MIT license, see the LICENSE file.

Uses the jQuery caret plugin by C. F., Wong (Cloudgen Examplet Store), licensed under MIT license.

Official site:

You can’t perform that action at this time.