hermes-cli

module
v0.0.0-...-f3738cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: AGPL-3.0

README

Maintainability codecov

HERMES-CLI

A simple CLI tool to publish events to a Mercure Hub, and optionally subscribe to receive them.

⚡️ Getting started

Download the binaries corresponding to your OS here.

Provide a Yaml file containing the different Mercure configurations per environment you wish to interact with. The project comes with a sample config file:

{
  "environments": [
    {
      "name": "localhost",
      "url": "https://localhost/.well-known",
      "jwtSecretKey": "!ChangeMe!"
    }
  ]
}

Recording of terminal demo

⚙️ Commands & Options

Option Description Type Default Required?
-h Display usage. No
-c Load the Mercure Hub configuration per environment. path . No
-n Number of events to publish to the Mercure Hub. int 5 No
-t Topic URI used by Mercure to manage pub/sub. string sse://pxc.dev/123456/test_mercure_events No
-p Only publish events, no client subscription. bool false No

TODO

  • publish binaries to allow installation with brew
  • encrypt secrets
  • generate different types of mock payload
  • sub should be randomly generated, to ensure no collisions

Directories

Path Synopsis
cmd
cli
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL