Skip to content

pythontrade/shell.js

 
 

Repository files navigation

Shell.js

npm npm snyk travis coveralls license

A JavaScript library to create HTML terminals in web pages.

Install

$ yarn add shell.js # recommended
$ npm i shell.js
$ bower install shell.js --save

Options

For each Shell instance you can set the following options:

Options Allowed values Description Defaut value
user string The user "user"
host string The host "host"
path string The working directory "~" | "C:\Windows\system32"
style "default"|"ubuntu"|"osx"|"windows" The OS style "default"
theme "dark"|"light" The theme "dark"
responsive boolean Responsiveness true
typed Typed callable Typed.js integration to make shell alive null
commands array The commands list []

Usage

Create a HTML element with a specified ID...

<div id="awesome-shell"></div>

...and pass the CSS selector to the Shell.js constructor:

document.addEventListener('DOMContentLoaded', function() {
    let shell = new Shell('#awesome-shell', {
        user: 'foobar',
        host: 'MacMini',
        path: '/etc/',
        style: 'osx',
        theme: 'dark',
        responsive: false,
        commands: ['First command', 'Second command', '...']
    });
});

Visit the documentation page

Author

Davide Caruso

License

Licensed under MIT.

About

⚡ A JavaScript library to create HTML terminals in web pages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 60.6%
  • SCSS 28.7%
  • JavaScript 5.7%
  • HTML 5.0%