Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-plugin

Command line interface plugin for web applications.

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

CLI Plugin

This project is a simple and easy to use command-line interface (CLI) for web applications.

Inspired by minimalistic user interfaces that are rich in functionality.
Designed for simplicity and built to empower.
Very light weight.

Features:

  • configurable commands
  • configurable colorschemes
  • keeps history of used commands

Demo

Click here for a live demo.

CLI Plugin

Install

  • Install 'cli-plugin' with bower
bower install cli-plugin
  • Install 'cli-plugin' with npm
npm install cli-plugin
  • Or include files directly in your html:
<link rel="stylesheet" type="text/css" href="dist/cli-plugin.min.css">
<script src="dist/cli-plugin.min.js"></script>

Setup

Initialize cliPlugin using a custom colorscheme/config file.

cliPlugin.init(config);

Config accepts following properties:

PropertyUsageDefaultRequired
textColortext color#111111no
cursorColorcursor color#111111no
backgroundColorbackground colorwhitesmokeno

Feel free to use hex, rgb(a) or html5 color names :)

Register commands

Register your own commands:

cliPlugin.bind('list', function () {
  cliPlugin.print('<p>items on the shopping list:</p>');
  cliPlugin.print('<ul><li>milk</li><li>bacon</li><li>eggs</li></ul>');
});

Useful functions

Use cliPlugin.print(text) command to print text on the screen, accepts html.

Use cliPlugin.clear() command to clear the screen.

Example

See index.html for an example implementation.

Keywords

FAQs

Package last updated on 05 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc