Skip to content

funkwerk-mobility/esdbcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esdbcat

PyPI version License Python Versions

A command-line tool for reading EventStore streams, inspired by kafkacat.

AI Code Notice

This repository was near-entirely created by Claude 3.5 Sonnet. Good job Sonnet!

Installation

pip install esdbcat

Usage

Read all events from a stream:

esdbcat my-stream

The output will be JSON lines with event data and metadata (by default):

{
  "data": {
    "message": "Hello World"
  },
  "metadata": {
    "id": "1234-5678-90ab-cdef",
    "type": "TestEvent",
    "stream": "my-stream"
  }
}

Follow a stream for new events:

esdbcat -f my-stream

Start reading from the end of the stream:

esdbcat -o end -f my-stream

Read only the last event:

esdbcat -o last my-stream

Exit after consuming 10 events:

esdbcat -c 10 my-stream

Filter events by type:

esdbcat -t UserCreated my-stream

Read the special $all stream:

esdbcat $all

Quiet mode (suppress informational messages):

esdbcat -q my-stream

Verbose mode for debugging:

esdbcat -v my-stream

Connect to a specific EventStore instance:

esdbcat --host eventstore.example.com:2113 my-stream

Or use a full connection URL:

esdbcat --url "esdb://eventstore.example.com:2113?tls=false" my-stream

Read events without metadata:

esdbcat --no-metadata my-stream

Connect with authentication:

esdbcat --url "esdb://admin:changeit@localhost:2113?tls=false" my-stream

About

Basically Kafkacat for EventstoreDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published