node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

cli-panel

cli-panel

Command line interface for sites.

install

From github.io:

<script src="//liksu.github.io/cli-panel/cli.min.js"></script>

or with npm

npm install cli-panel

and then

<script src="node_modules/cli-panel/build/cli.min.js"></script>

or you can inject it after site loaded:

(function() {
    var scriptElement = document.createElement('script');
    scriptElement.type = 'text/javascript';
    scriptElement.src = '//liksu.github.io/cli-panel/cli.min.js';
    var body = document.getElementsByTagName('body')[0];
    body.appendChild(scriptElement);
    setTimeout(function() {cli.init()}, 1000);
})();

or minified version:

!function(d){var t=d.createElement("script");t.type="text/javascript",t.src="//liksu.github.io/cli-panel/cli.min.js";var e=d.getElementsByTagName("body")[0];e.appendChild(t),setTimeout(function(){cli.init()},1e3)}(document);

API

cli.command(name, [description], callback)

Add command.