Home

Awesome

jsterm

jsterm is a terminal simulator that uses a JSON filesystem. To see it in use, check out clarkduvall.com.

Disclaimer

Most of this was written awhile ago when I knew JavaScript about as well as I know Spanish (which is a little, but not much). It is due for a rewrite with some cool new features like pipes, writable files, and other magic.

How To Use

At the bottom of the js/jsterm.js file, there is a series of term.enqueue() calls. This is where the commands are set that are run when the page loads. Other changes can be made to personalize your terminal. The directory structure is as follows:

For the loading of the filesytem to work locally, you must server the files in the directory from a local server. To do this easily, change into the jsterm directory and run:

python -m SimpleHTTPServer 8000

Filesystem Format

A filesystem is a recursive grouping of JSON arrays of objects. Each nested array represents the listing of items in a directory. Each object in the array defines a file or directory. For an example, see json/sample.json.

make_fs.py

This is a script that will create a jsterm filesystem from a real directory. Examples of how to make different file types are as follows:

This is a text file.
http://google.com

Attribution

If you use jsterm, it would be great if you could link to this GitHub repo. Thanks!