Working locally with Postman - Introducing Postman CLI

Hi everyone,

I’ve been engaged with a project to see how we can enable the editing, version control and general management of Postman scripts, requests and responses on the local file system, instead of through the Postman app.

The idea behind this is to allow for things like:

  • Being able to write code in your chosen editor
  • Ability to apply your own lint rules
  • Using packages from npm you aren’t otherwise able to include
  • Working from files/folders on your machine, version controlling them in the same way as the rest of your API code

I’ve created a CLI which allows you to get started with this. All you need is:

  • A Postman API key
  • Node version 10.12 or later

You can find the README and instructions for install here:

We’ve been testing this CLI in a few different places, and would be really keen to hear what the community makes of it. I’m welcoming all bugs, feedback and comments either here or in the Issues tab of the repo.

If you’re using Postman in a team setting - feel free to drop me a message - I’d be happy to give your team a demo/walkthrough of the capability.

Cheers,
Matt

7 Likes

Awesome stuff @matt :trophy:

I was wanting this also. I think there have been some posts on the forums asking for something similar. This would make it very handy. I might test this out on my side projects to get a feel for it. But I definately love this ide!.

1 Like

@matt - So the main point of this is working on Postman scripts locally instead of in the app?

Or what is the main use case?

I can’t say I’m super familiar with Newman, but is this something you can’t do with Newman?

Looking at your Github, I saw your “postman-read-file”. I need to try this out, been looking for something like this :slight_smile: :grinning:

@TreyT - exactly, therefore by editing them locally you can version control those files like all your other code too.

Newman is for executing collection runs at the command line or through a script. This is particularly useful if your collection is full of tests and you want to run them in CI.

There isn’t any overlap between the two as things stand.

Glad to hear the read file project might be useful to you!

Too busy right now to play with it but it looks awesome! Keep up and thank you.