CLI Client for Nakadi - Cross-platform, no-dependency minimal CLI for interacting with Nakadi
brew install amrhassan/macosapps/nakacli
snap install --edge nakacli
aurman -S nakacli-bin # Or substitute with your favorite AUR helper
nakacli compiles into a single executable binary with no extra runtime dependencies (except for openssl), so find the latest release in releases and run it however you run binaries on your operating system.
- 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
nakacli event publish [FLAGS] [OPTIONS] <event-type> <json-body>
Publishes one or more events of the type
<json-body> can be the full body of a single event as a JSON object, or a JSON array containing an object for each event to be published.
You can specify a file path to read the event body from by passing
@FILEPATH as the
Data Change events
To publish a Data Change event, you'll have to provide one of the options:
--data-snapshot, otherwise your command will not be, accepted by the Nakadi server.
To publish a Business event, you'll have to provide the
--business option, otherwise your
command will not be accepted by the Nakadi server.
nakacli event stream [FLAGS] [OPTIONS] <event-type>
Starts streaming published events of type
<event-type> to STDOUT. It should block while it's streaming published events until it is interrupted by the user, or it has consumed
N number of events where
N is provide by the
nakacli event-type create [FLAGS] [OPTIONS] <owning-application> <name> <json-schema>
Creates an event type with the given parameters. Optionally accepts a
--partition-strategy=hash param, with which you'll have to specify one or more
--partition-key-field to indicate the fields to be used in computing the partitioning hash. Compatibility mode for created event type can be specified using the
You can specify a file path to read the JSON Schema from by passing
@FILEPATH as the
nakacli event-type delete [FLAGS] [OPTIONS] <name>
Deletes the event-type with the specified
nakacli event-type list [FLAGS] [OPTIONS]
Lists all the registered available event-types (most likely a lot of output, prepare to pipe it to
less. Also the
--pretty flag might make it more human-readable if you're interested in reading it.)
nakacli metrics [FLAGS] [OPTIONS]
Prints the Nakadi server metrics.
--bearer-token <TOKEN> and
For any command, you can specify a Bearer token via the
--bearer-token <TOKEN> option or the
BEARER_TOKEN environment variable.
If you have Zign set up, you can use it by simply passing the
Specifies the URL to the Nakadi server in the format
scheme://[auth:]hostname:[port]. It can also be set via the
NAKADI_URL environment variable.
Makes JSON output properly-indented for easier human readability.
Specifies the network timeout for non-streaming operations in seconds (default value: 1).
nakacli help for a full list of all the supported commands, and
nakacli COMMAND --help for their options, flags and arguments.