You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

clibro

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clibro

Command Line Interface for spacebro-client

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

clibro

Command Line Interface for connecting to a Spacebro server.

🌍 Installation

$ yarn global add clibro

or

$ npm global add clibro

⚙ Configuration

You can pass a custom config file as second argument like this:

$ clibro my-config.json

The JSON settings looks like:

{
  "service": {
    "spacebro": {
      "address": "spacebro.space",
      "port": 3344,
      "channel": "media-stream",
      "client": "clibro"
    }
  }
}

👋 Usage

Once clibro is installed, you can run it with:

$ clibro

You will then enter the clibro Command-line interface. You can run the following commands:

Help

clibro$ help

Displays the list of commands.

Quit

To quit type: exit then ⏎

Emit event

To emit an event, use the emit command with the name of the event and the data you want to pass:

clibro$ emit myEvent '{"msg":"moto"}'

You can pass additional options to the emit command:

  • --interval X eventName: the event is emitted every X seconds,
  • --stop eventName: stops interval emitting for the event eventName

So you can type: emit --interval 5 foobar "{'msg':'hello'}" to emit the event foobar every 5 seconds with parameters {'msg':'hello'}

You can then type emit --stop foobar to stop emitting foobar.

Subscribe event

You can subscribe to an event. If you want clibro to print a message in the terminal every time it receives an event named helloWorld, you use the subscribe command:

clibro$ subscribe helloWorld

Unsubscribe event

To remove the subscription, use the unsubscribe command:

clibro$ unsubscribe helloWorld

📦 Dependencies

For this project we use:

  • spacebro-client
  • vorpal

🕳 Troubleshooting

If you need any help to use clibro, please open an issue. We will try to reply as fast we can.

❤️ Contribute

If you love the project, contribute! If you have an idea, or something you want changed, open an issue and/or make a pull request.

When contributing, please make sur your code follows the standard-js format and passes every unit test by running the following scripts:

$ yarn lint
...
$ yarn test

Thank you!

Keywords

spacebro

FAQs

Package last updated on 16 Jun 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