# Working locally with Postman - Introducing Postman CLI

**URL:** <https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457>\
**Category:** Help Hub\
**Created:** [March 20, 2020, 10:18pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457 "2020-03-20T22:18:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/matt/32/2562_2.png) [@matt](https://community.postman.com/u/matt)\
**Post date:** [March 20, 2020, 10:18pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/1 "2020-03-20T22:18:24Z")

</div>

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:

> **[GitHub - matt-ball/postman-local: A client to facilitate local development of...](https://github.com/matt-ball/postman-local)**
>
> A client to facilitate local development of scripts for Postman.

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

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 20, 2020, 10:29pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/2 "2020-03-20T22:29:38Z")

</div>

Awesome stuff @matt 🏆

---

<div class="post-metadata">

**Author:** ![stefan.clem](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@stefan.clem](https://community.postman.com/u/stefan.clem)\
**Post date:** [March 23, 2020, 5:53pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/3 "2020-03-23T17:53:31Z")

</div>

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!.

---

<div class="post-metadata">

**Author:** ![TreyT](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TreyT](https://community.postman.com/u/TreyT)\
**Post date:** [March 24, 2020, 7:09am UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/4 "2020-03-24T07:09:32Z")

</div>

@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 🙂 😀

---

<div class="post-metadata">

**Author:** ![matt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/matt/32/2562_2.png) [@matt](https://community.postman.com/u/matt)\
**Post date:** [March 24, 2020, 4:09pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/5 "2020-03-24T16:09:05Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![danielcd](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@danielcd](https://community.postman.com/u/danielcd)\
**Post date:** [March 25, 2020, 6:25pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/6 "2020-03-25T18:25:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jtam-fmi](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jtam-fmi](https://community.postman.com/u/jtam-fmi)\
**Post date:** [August 11, 2020, 6:29pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/7 "2020-08-11T18:29:26Z")

</div>

Could not get beyond “postman setup”. When I enter the API Key, it always comes back with Invalid Postman Api key!

---

<div class="post-metadata">

**Author:** ![matt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/matt/32/2562_2.png) [@matt](https://community.postman.com/u/matt)\
**Post date:** [August 11, 2020, 7:37pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/8 "2020-08-11T19:37:22Z")

</div>

Does that API key work for other Postman API interactions?

Try creating a new key here?

[https://go.postman.co/settings/me/api-keys](https://go.postman.co/settings/me/api-keys)

---

<div class="post-metadata">

**Author:** ![jtam-fmi](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jtam-fmi](https://community.postman.com/u/jtam-fmi)\
**Post date:** [August 11, 2020, 8:09pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/9 "2020-08-11T20:09:58Z")

</div>

I have tried regenerating a new key several times. It still won’t work. I have no other Postman API interactions. I was hoping to use Postman CLI because I have a npm package that I need to include.

---

<div class="post-metadata">

**Author:** ![matt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/matt/32/2562_2.png) [@matt](https://community.postman.com/u/matt)\
**Post date:** [August 11, 2020, 8:14pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/10 "2020-08-11T20:14:21Z")

</div>

Assuming there are no issues with how you’re pasting the key, I would try making a request to our API through Postman:

[https://documenter.getpostman.com/view/631643/JsLs/?version=latest#647806d5-492a-eded-1df6-6529b5dc685c](https://documenter.getpostman.com/view/631643/JsLs/?version=latest#647806d5-492a-eded-1df6-6529b5dc685c)

If you still have issues, please message me!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 2:46pm UTC](https://community.postman.com/t/working-locally-with-postman-introducing-postman-cli/11457/11 "2024-12-12T14:46:56Z")

</div>

Closed on December 12, 2024, 2:46pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
