Commands

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

  • hop auth: Authentication utilities

  • hop list-topics: SHow accessible Kafka topics

  • 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 configure credentials for authentication.

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

Authentication configuration utilities.

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

commands:
  <command>
    locate    display configuration path
    list      Display all stored credentials
    add       Load a credential, specified either via a CSV file or
              interactively
    remove    Delete a stored credential

No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`

hop list-topics

This command allows a user to view the topics that are available for subscribing or publishing on a given Hopskotch server.

Note that other topics may exist which the current user does not have permission to access.

usage: hop list-topics [-h] [--no-auth] URL

List available topics.

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.

No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`

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.

Unstructured messages may be piped to this command to be published. This mode of operation requires JSON input with individual messages separated by newlines, and the Blob format (-f BLOB) to be selected.

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

Publish messages.

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

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

No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`

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}] [-p]
                     [-g GROUP_ID] [-j]
                     URL

Subscribe to 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}, --start-at {EARLIEST,LATEST}
                        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.
  -g GROUP_ID, --group-id GROUP_ID
                        Consumer group ID. If unset, a random ID will be
                        generated.
  -j, --json            Request message output as raw json

No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`

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

No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`