Hmm maybe this is what I want: https://github.com/brad28b/meshtastic-cli-receive-text But I can't install it currently, I get python stack trace instead...
UPD. Fail. I've managed to launch it, but it is same as "listen", it receives only new messages in real time.