New Project: WICK - WAMP In CLI

WICK is a CLI tool for WAMP. When developing WAMP APIs, it can become a challenge to test them, WICK makes that very easy. Think of it as cURL but for WAMP.

The code is open-source. The initial work was done by my students as part of our effort to familiarize ourselves with Go lang.

The CLI interface looks like below

usage: wick [<flags>] <command> [<args> ...]

  --help                     Show context-sensitive help (also try --help-long and --help-man).
                             WAMP URL to connect to
  --realm="realm1"           The WAMP realm to join
  --authmethod=AUTHMETHOD    The authentication method to use
  --authid=AUTHID            The authid to use, if authenticating
  --authrole=AUTHROLE        The authrole to use, if authenticating
  --secret=SECRET            The secret to use in Challenge-Response Auth.
  --private-key=PRIVATE-KEY  The ed25519 private key hex for cryptosign
  --public-key=PUBLIC-KEY    The ed25519 public key hex for cryptosign
  --ticket=TICKET            The ticket when when ticket authentication
  --authextra=AUTHEXTRA ...  The authentication extras
  --serializer=json          The serializer to use

  help [<command>...]
    Show help.

  subscribe <topic>
    subscribe a topic.

  publish [<flags>] <topic> [<args>...]
    Publish to a topic.

  register <procedure> [<command>]
    Register a procedure.

  call [<flags>] <procedure> [<args>...]
    Call a procedure.

It’s published for Linux as snap, we will also be publishing it to Homebrew for macOS users.

One interesting feature that I wanted to show below. We register a procedure that runs a shell command and returns its output

om26er@RemotePC:~/scm/codebasepk/wick$ ./wick register 'ls -la'
wick> Connected to  ws://localhost:8080/ws
wick> Registered procedure with router

And the output

om26er@RemotePC:~/scm/codebasepk/wick$ ./wick call
wick> Connected to  ws://localhost:8080/ws
total 10296
drwxrwxr-x 6 om26er om26er     4096 Oct 24 04:21 .
drwxrwxr-x 4 om26er om26er     4096 Oct 24 01:02 ..
drwxrwxr-x 3 om26er om26er     4096 Oct 24 00:59 cmd
drwxrwxr-x 8 om26er om26er     4096 Oct 24 04:21 .git
-rw-rw-r-- 1 om26er om26er      454 Oct 24 03:52 go.mod
-rw-rw-r-- 1 om26er om26er     2778 Oct 24 00:59 go.sum
-rw-rw-r-- 1 om26er om26er      138 Oct 24 00:59 Makefile
-rw-rw-r-- 1 om26er om26er      378 Oct 24 03:52
drwxrwxr-x 2 om26er om26er     4096 Oct 24 00:59 snap
drwxrwxr-x 2 om26er om26er     4096 Oct 24 03:52 wamp
-rwxrwxr-x 1 om26er om26er 10500685 Oct 24 04:21 wick

To keep things clean and CI “friendly” we support reading WAMP parameters (url, realm, authid, private-key, ticket…) from environment variables as well.

Your feedback is welcome. For version 2, I want to explore something like “WICK Compose” i.e. chaining and mixing wamp calls.

1 Like

Hello Omer, nice Job ! :wink:

1 Like