# Newman command --export-environment does not export file in CI

**URL:** <https://community.postman.com/t/newman-command-export-environment-does-not-export-file-in-ci/36962>\
**Category:** Help Hub\
**Tags:** newman-project, ci-cd, export\
**Created:** [July 7, 2022, 2:34pm UTC](https://community.postman.com/t/newman-command-export-environment-does-not-export-file-in-ci/36962 "2022-07-07T14:34:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prabhjos](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@prabhjos](https://community.postman.com/u/prabhjos)\
**Post date:** [July 7, 2022, 2:34pm UTC](https://community.postman.com/t/newman-command-export-environment-does-not-export-file-in-ci/36962/1 "2022-07-07T14:34:11Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_: I would like to export environment file so that I can use the updated environment file for the next collection run in the pipeline.

_I’ve already tried_: I tried to run the newman command locally with the below command and the environment file got exported with updated values.

**newman run collection.postman\_collection.json -e sample\_environment.postman\_environment.json --export-environment sample\_environment.postman\_environment.json**

I gave the same command in my workflow file but the environment file is not exported because I see the value empty.

---

<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:** [April 8, 2025, 3:20pm UTC](https://community.postman.com/t/newman-command-export-environment-does-not-export-file-in-ci/36962/2 "2025-04-08T15:20:36Z")

</div>

Closed on April 8, 2025, 3:20pm UTC

Sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

We’re closing out older posts to help keep the community organized and relevant. Each CI tool stores artefacts from pipeline runs differently and you will need to consult their documentation for that information.
