Commands

hop-client provides a command line interface for various tasks:

  • hop auth: Authentication utilities

  • hop publish: Publish messages such as GCN circulars and notices

  • hop subscribe: Listen to messages such as GCN circulars and notices

  • hop version: Show version dependencies of hop-client

hop auth

This command allows a user to handle auth-based configuration.

usage: hop auth [-h] <command> ...

Authentication utilities.

optional arguments:
  -h, --help  show this help message and exit

Commands:
  <command>
    locate    display authentication config path
    setup     set up authentication config with defaults

hop publish

This command allows a user to publish various structured and unstructured messages, including:

Structured messages such as GCN circulars and VOEvents are published as JSON-formatted text.

usage: hop publish [-h] [--no-auth] [-f {CIRCULAR,VOEVENT,BLOB}]
                   URL MESSAGE [MESSAGE ...]

Parse and publish messages.

positional arguments:
  URL                   Sets the URL (kafka://host[:port]/topic) to publish
                        messages to.
  MESSAGE               One or more messages to publish.

optional arguments:
  -h, --help            show this help message and exit
  --no-auth             If set, disable authentication.
  -f {CIRCULAR,VOEVENT,BLOB}, --format {CIRCULAR,VOEVENT,BLOB}
                        Specify the message format. Defaults to BLOB for an
                        unstructured message.

hop subscribe

This command allows a user to subscribe to messages and print them to stdout.

usage: hop subscribe [-h] [--no-auth] [-s {EARLIEST,LATEST,PRODUCER}] [-p]
                     [-j]
                     URL

Receive and parse messages.

positional arguments:
  URL                   Sets the URL (kafka://host[:port]/topic) to publish
                        messages to.

optional arguments:
  -h, --help            show this help message and exit
  --no-auth             If set, disable authentication.
  -s {EARLIEST,LATEST,PRODUCER}, --start-at {EARLIEST,LATEST,PRODUCER}
                        Set the message offset offset to start at. Default:
                        LATEST.
  -p, --persist         If set, persist or listen to messages indefinitely.
                        Otherwise, will stop listening when EOS is received.
  -j, --json            Request message output as raw json

hop version

This command prints all the versions of the dependencies

usage: hop version [-h]

List all the dependencies' versions.

optional arguments:
  -h, --help  show this help message and exit