voryx/thruway-cli

CLI for Thruway (WAMP)

0.0.2 2016-11-07 01:53 UTC

This package is auto-updated.

Last update: 2024-10-27 04:18:12 UTC


README

Thruway CLI is a command line tool that allows you to execute WAMP commands for testing purposes.

Installation

Download thruway-cli.phar from the latest release.

$ chmod 755 thruway-cli.phar
$ sudo mv thruway-cli.phar /usr/local/bin/thruway-cli

Example

$ thruway-cli wss://demo.crossbar.io/ws realm1

Commands

  exit [<code>] 
  help  
  publish <uri> <value> [<options>]     
  call <uri> [<args>] [<options>]       
  subscribe <uri> [<options>]       
  cancel        
  register <uri> [<options>]   

Subscribe

thruway> subscribe demo.topic
thruway> subscribe demo. '{ "match": "prefix" }'

Publish

thruway> publish demo.topic 'Hello World'
thruway> publish demo.topic 'Hello World' '{"exclude_me":false}'

Call

thruway> call demo.rpc 123
thruway> call demo.rpc "Hello World"
thruway> call demo.rpc '["Hello", "World"]'
thruway> call demo.rpc '["Hello", "World"]' '{"receive_progress": true}'

Register

thruway> register demo.rpc
thruway> register demo.rpc '{"progress": true}'