{"repo":"sasadjolic/dom-terminal","free":true,"listed":false,"github":"https://github.com/sasadjolic/dom-terminal","clone":"git clone https://github.com/sasadjolic/dom-terminal.git","description":"Command-line terminal that runs in a web browser","language":"JavaScript","stars":198,"topics":["javascript","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":"Terminal Simple command-line terminal for your browser app. Web apps are great. But sometimes instead of all the double-clicks, mouse pointers, taps and swipes across the screen - you just want good old keyboard input. This terminal runs in a browser, desktop or mobile. It provides a simple and easy way to extend the terminal with your own commands. Enjoy. How to use Include terminal.js and terminal.css in your HTML: Define an HTML div tag where the terminal will be contained: Create a new terminal instance and convert the DOM element into a live terminal. This won't be terribly useful because by default the terminal doesn't define any commands. It's meant to be extended. Let's define some: This gives us 4 commands: clear , help , theme , and ver or version . Go ahead and try it out using our live example. Features Welcome message The default welcome message is empty but you can set it to be anything. Command-line history History is automatically kept track of. You can use up and down arrow keys to go through the command-line history, just like a standard shell. Prompt and separator You can change the prompt. The default is an empty prompt with a separator. Set the prompt option to change. This will display the prompt like this: C:\\ Theme There are 3 built-in themes: interlaced modern white modern theme is the default modern is a clean modern theme that's white on black, while the white theme is black on white. If you're nostalgic about the old-school CRT monitors then the in","default_branch":null,"files":null,"tree":[],"storefront":"/r/sasadjolic","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sasadjolic/dom-terminal/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}