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 configure: Subcommands for checking and setting configuration options

  • hop version: Show version dependencies of hop-client

hop auth

This command allows a user to configure credentials for authentication.

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

Authentication configuration utilities.

options:
  -h, --help     show this help message and exit
  -q, --quiet    If set, only display warnings and errors.
  -v, --verbose  If set, display additional logging messages.

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.

options:
  -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 either the blob format (-f BLOB) or JSON (-f JSON) to be selected, and splits the input into separate messages at newlines.

usage: hop publish [-h] [--no-auth] [-q | -v]
                   [-f {VOEVENT,GCNTEXTNOTICE,CIRCULAR,BLOB,JSON,AVRO,EXTERNAL}]
                   [-t]
                   URL [MESSAGE ...]

Publish messages.

positional arguments:
  URL                   Sets the URL (kafka://host[:port]/topic) to publish
                        messages to.
  MESSAGE               File of messages to publish. (standard input is used
                        if omitted)

options:
  -h, --help            show this help message and exit
  --no-auth             If set, disable authentication.
  -q, --quiet           If set, only display warnings and errors.
  -v, --verbose         If set, display additional logging messages.
  -f, --format {VOEVENT,GCNTEXTNOTICE,CIRCULAR,BLOB,JSON,AVRO,EXTERNAL}
                        Specify the message format. Defaults to BLOB for an
                        unstructured message.
  -t, --test            Mark messages as test messages by adding a header with
                        key '_test'.

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] [-q | -v] [-s {EARLIEST,LATEST}] [-e]
                     [-g GROUP_ID] [-j] [-t]
                     URL

Subscribe to messages.

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

options:
  -h, --help            show this help message and exit
  --no-auth             If set, disable authentication.
  -q, --quiet           If set, only display warnings and errors.
  -v, --verbose         If set, display additional logging messages.
  -s, --start-at {EARLIEST,LATEST}
                        Set the message offset offset to start at. Default:
                        LATEST.
  -e, --until-eos       If set, only subscribe until EOS is received (end of
                        stream). Otherwise, listen to messages indefinitely.
  -g, --group-id GROUP_ID
                        Consumer group ID. If unset, a random ID will be
                        generated.
  -j, --json            Request message output as raw json
  -t, --test            Process test messages instead of ignoring them.

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 configure

This is a category of subcommands which allow a user to check and set configuration options for hop-client, both as a command-line tool and a library.

hop configure locate

This command provides information on the location(s) from which configuration data will be read.

usage: hop configure locate [-h] [-t {general,auth}]

options:
  -h, --help            show this help message and exit
  -t, --type {general,auth}
                        The type of configuration file to locate. Defaults to
                        general configuration.

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 configure show

This command outputs the current configuration including both data from configuration files and any overriding values specified via environment variables.

usage: hop configure show [-h]

options:
  -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`

hop configure set

This command records a new value for a configuration parameter to the configuration file.

usage: hop configure set [-h] {fetch_external,automatic_offload} value

positional arguments:
  {fetch_external,automatic_offload}
                        The configuration parameter to set
  value                 The parameter value to set

options:
  -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`

hop version

This command prints all the versions of the dependencies

usage: hop version [-h]

List all the dependencies' versions.

options:
  -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`