CLI management tool (eskit CLI) #115

Closed
opened 2026-02-23 09:30:56 +00:00 by ash · 0 comments
Owner

Summary

Expand #63 scope into a full management CLI for eskit stores.

Commands

eskit streams list                        # list all streams with event counts
eskit streams show <id>                   # show events in a stream, decoded
eskit events search --correlation <id>    # find by correlation ID
eskit events search --type <event-type>   # find by event type
eskit events show <global-pos>            # show single event with full detail
eskit projections list                    # show projection checkpoint positions
eskit projections rebuild <name>          # rebuild a projection from scratch
eskit commands list                       # list recent commands (requires #114)
eskit commands show <id>                  # show command + resulting events
eskit store stats                         # event count, stream count, size
eskit store health                        # connectivity, schema version
eskit migrate --from <dsn> --to <dsn>     # store migration (see #116)

Codec handling

Since we support JSON, CBOR, Protobuf — the CLI must auto-detect codec from store metadata or accept --codec flag to properly decode event payloads for display.

Store connection

eskit --store sqlite://app.db streams list
eskit --store postgres://user:pass@host/db streams list
eskit --store nats://host:4222 streams list

Output formats

  • Human-readable table (default)
  • JSON (--json)
  • For piping/scripting

Testing Requirements

  • Unit tests for every subcommand (streams, events, projections, commands, store)
  • Integration tests against real SQLite/Postgres/NATS stores
  • DSN parsing tests (valid, invalid, edge cases)
  • Codec auto-detection tests (JSON, CBOR, Protobuf payloads)
  • Output format tests (table vs JSON)
  • Error handling tests (unreachable store, empty store, invalid stream ID)
  • Golden file tests for CLI output formatting

Benchmark Requirements

  • Benchmark streams list with 100, 1K, 10K, 100K streams
  • Benchmark events search --correlation across large stores
  • Benchmark codec decoding throughput per format
  • Memory profiling for large result sets (ensure streaming, not buffering)

Supersedes

This supersedes #63 with expanded scope.

Dependencies

  • Command log queries depend on #114 (command persistence)
## Summary Expand #63 scope into a full management CLI for eskit stores. ## Commands ``` eskit streams list # list all streams with event counts eskit streams show <id> # show events in a stream, decoded eskit events search --correlation <id> # find by correlation ID eskit events search --type <event-type> # find by event type eskit events show <global-pos> # show single event with full detail eskit projections list # show projection checkpoint positions eskit projections rebuild <name> # rebuild a projection from scratch eskit commands list # list recent commands (requires #114) eskit commands show <id> # show command + resulting events eskit store stats # event count, stream count, size eskit store health # connectivity, schema version eskit migrate --from <dsn> --to <dsn> # store migration (see #116) ``` ## Codec handling Since we support JSON, CBOR, Protobuf — the CLI must auto-detect codec from store metadata or accept `--codec` flag to properly decode event payloads for display. ## Store connection ``` eskit --store sqlite://app.db streams list eskit --store postgres://user:pass@host/db streams list eskit --store nats://host:4222 streams list ``` ## Output formats - Human-readable table (default) - JSON (`--json`) - For piping/scripting ## Testing Requirements - Unit tests for every subcommand (streams, events, projections, commands, store) - Integration tests against real SQLite/Postgres/NATS stores - DSN parsing tests (valid, invalid, edge cases) - Codec auto-detection tests (JSON, CBOR, Protobuf payloads) - Output format tests (table vs JSON) - Error handling tests (unreachable store, empty store, invalid stream ID) - Golden file tests for CLI output formatting ## Benchmark Requirements - Benchmark `streams list` with 100, 1K, 10K, 100K streams - Benchmark `events search --correlation` across large stores - Benchmark codec decoding throughput per format - Memory profiling for large result sets (ensure streaming, not buffering) ## Supersedes This supersedes #63 with expanded scope. ## Dependencies - Command log queries depend on #114 (command persistence)
ash closed this issue 2026-02-23 11:06:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#115
No description provided.