nakacli 0.1.0

CLI client for Nakadi
nakacli-0.1.0 is not a library.

nakacli

Build Status Released Version

CLI Client for Nakadi

Install

macOS

brew install amrhassan/macosapps/nakacli

Ubuntu

snap install --edge nakacli

Arch Linux

yaourt -S nakacli-bin   # Or substitute with your favorite AUR helper

Other Platforms

nakacli compiles into a single binary with no extra runtime dependencies, so find the latest release in releases and run it however you run binaries on your operating system.

Features

  • Metrics querying
  • Zign authentication
  • Event type creation
  • Even type deletion
  • Publishing events
  • Stream published events of a certain type
  • Creating subscriptions
  • Stream-listening on events from a subscription

Usage Examples

Publishing an event

To publish an event of the type named special-event with the example JSON data:

{"n1": 55, "quantity": 800, "details": "The event has happened"}
nakacli event publish special-event '{"n1": 55, "quantity": 800, "details": "The event has happened"}'

The JSON body can be a JSON Object with a single event's data or a JSON Array containing a JSON Object for each event to be published.

Streaming published events

To stream the published events for the event type special-event:

nakacli event stream special-event

Authorization

You could specify a Bearer token via the --bearer-token flag or the BEARER_TOKEN environment variable.

nakacli --bearer-token=(secret_token) metrics
export BEARER_TOKEN=(secret_token)
nakacli metrics

If you have Zign set up, you can use it by simply passing the --zign flag.

nakacli --zign metrics

More

Chec nakacli --help for a full list of all the supported commands, their options, flags and arguments.