As part of my effort to automate the review process for our users, I'm trying to run the stats command from a python script using prodigy.serve (I intend to parse the output and use it later on):
The majority of Prodigy recipes that require the web UI spin up the annotation server. There are others (which we call "commands") that do not require the UI and are used only in terminal. stats is one of them which is why it is not supposed to be used with prodigy.serve.
The good news is that "commands" are just python scripts that you can import to your code and use directly.
This post shows how to use stats programmatically from Python. Let me know if that doesn't work for you.