cURL calls into postman mocks


I am trying to return a mock data set using Postman Pro. From each call, I am able to update the global dataset in Postman when I use pre-request scripts. However, I can not do the same manipulation outside of Postman. How can I have the same functionality using cURL calls to update the global dataset?

For example, I am trying to add a pet resource to a dataset using these calls which adds an object.
POST - /pets
GET - /pets

This works with Postman using pre-request script, but it does not work with a cURL call because the pre-request does not get called. How can I accomplish this outside Postman?

You will need to rebuild this functionality using bash scripts or other scripting language that makes it available in the CLI.