spy/monitor and decode spi protocol between master and slave
Sigrok is free/open source software able to operate most logic analyzers intended to support custom python backends and including many such example decoders.
You can also simple pipe output into a solution in some other language.