Fork me on GitHub

What is terminal.js?

terminal.js is a dead simple JavaScript library for emulating a shell environment. Like this:

How to use

Download the terminal.js file and include it in your HTML head:

Now in your script, it´s time to create an instance of a terminal object. You can create as many terminal instances as you like and they will behave independently:

To insert the terminal element into a HTML element, call the ".html()" method of the terminal instance:



var myTerminal = new Terminal(id)

A terminal.js instance offers the following properties and methods:


Style your terminal:

Asking for user input and acting upon it:

Using the timer: