An extensible command line interface for the browser.
The hardest part of the project was, of course, trying to replicate a bash command line with process management. For it to be useful to users at all, it needed to provide core functionality that users expect from a command line. Scope creep started to slow down development momentum, so eventually I had to nail down what features I wanted in release v1.0.0 and settle for additional features in later releases. The desired functionality for the first release was as follows:
- Interactive IO
- Process management
- Environment variable storage, recall, and persistence
- Command completion (via the tab key)
- Input history (accessible with the up and down keys)
- A set of standard library processes
The set of standard library processes in v1.0.0 includes:
- loads user/session information from the document cookies and (in later versions) will authenticate the user’s credentials.
- prints the supplied input back to the shell.
- creates a variable that persists across browser sessions via cookies.
- offers help information for the command line interface.
- lists all processes that are currently running.
- prints all environment variables.
- demonstrates how to get user input from within a process and how to call other commands from within a process.
- erases an environment variable.