CLI Client for Nakadi
bash
brew install amrhassan/macosapps/nakacli
bash
snap install --edge nakacli
bash
yaourt -S nakacli-bin # Or substitute with your favorite AUR helper
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.
To publish an event of the type named special-event
with the example JSON data:
json
{"n1": 55, "quantity": 800, "details": "The event has happened"}
bash
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.
To stream the published events for the event type special-event
:
bash
nakacli event stream special-event
You could specify a Bearer token via the --bearer-token
flag or the BEARER_TOKEN
environment variable.
bash
nakacli --bearer-token=(secret_token) metrics
bash
export BEARER_TOKEN=(secret_token)
nakacli metrics
If you have Zign set up, you can use it by simply passing the --zign
flag.
bash
nakacli --zign metrics
Chec nakacli --help
for a full list of all the supported commands, their options, flags and arguments.