A web-based command-line shell.
C JavaScript CSS HTML Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Teneral is a proof-of-concept command-line interface for the web.

Ten-er-al (adj.): The condition of an arthropod shortly after shedding its former shell, when the animal is free to grow.


'Terminal emulators' are designed to emulate the DEC VT100 or VT220 hardware terminals, released in 1978. The goal of Teneral is to demonstrate that we can do better by instead basing them on modern web technologies.

Each command executed via Teneral is displayed in its own output window. These windows can be minimized, closed, resized, and scrolled individually. The output window border color indicates whether the command is still running (bright green), completed successfully (green), or failed (red). Because each command has its own window, there's no need to move jobs between background and foreground.

Teneral uses modern web features like websockets and data-URIs, so a recent standards compliant browser is recommended.

As a quick, hacky demo: any command ending in .jpg will be interpreted and displayed as a JPEG.


Just run make in src/.

(Requires libEV, libJSON, and OpenSSL. To use gcc, edit Makefile.)


Start the server up on localhost, port 10002:



  • Collaborative sessions
  • Save and restore sessions
  • Allow HTML/JS output from commands
  • Display standard error separately
  • Check credentials via PAM
  • SSL (For now, proxy it behind Apache)
  • More I/O redirection


  • tnrld.c - Main entry point, starts the daemon.
  • http.c - Handle HTTP requests and responses; serve static files.
  • socket.c - Callbacks to read from and write to sockets.
  • websocket.c - Upgrade a socket to a websocket.
  • processes.c - Execute processes via fork/exec, set up events.
  • messages.c - JSON encoding/decoding.
  • writebuf.c - A buffer of data waiting to be written.
  • ilist.c - Sorted array-list. Used to track PIDs, sockets, etc.
  • static/index.html - HTML for the client interface.
  • static/tnrl.js - Javascript for the client UI.
  • static/tnrl.css - UI styling.


  • Current path display is hardcoded.
  • cd not implemented.


(C) 2012, Rusty Mellinger. Released under GPLv3, see COPYING.