Web-as-a-shell
Fun project that allows one to use the web services using shell commands
Project maintained by wzsddtc2
Hosted on GitHub Pages — Theme by mattgraham
How to use Web as a Shell?
Download/clone the code to a local directory.
Open index.html in Chrome and enjoy. -there's no server side of this.
Alternatively, try this demo here.
Commands are handled by "handlers", which are automatic loaded when called. They can be dynamically dropped into ./js/handlers. For example, all commands that starts with user will be handled by user.js inside handlers folder.
Commands can interact with other commands just like you would do it in a shell.
To store sensitive information, use the user command.
Initial Goal: build a basic framework to have dropbox credentials stored and use them in command line. The project should potentially be used in Node.js as well.
user.js - handles user creation, login, and key management.
- user create username - create a user and generate a key for encrypting user data, all the user data are encrypted using this key, the key itself is encrypted using the password.
- user login username - login as username, upon successful login, the key will be decrypted for the current session.
dropbox.js - uses user handler to store user dropbox information and acts as a wrapper for dropbox api.
- dorpbox use api_key api_secret to initialize the handler. - one time.
- dropbox login username - to authenticate an account for the current api. -one time.
- dropbox cd ... allows dropbox to act as a folder and interface with cd.js.
- dropbox ls ... allows dropbox to act as a folder and interface with ls.js.
cd.js - allows changing the base handler and make shortcuts, perhaps for folder options.
- cd handler_name will make the rest of the cd command to be handled as "handler_name cd ..."
- cd ~ will reset the handler for cd.
ls.js - allows changing the base handler and make shortcuts, perhaps for folder options.
- uses the same handler as cd.js, handle all the commands as "handler_name ls ..."