Migrate scripts from Newman to the Postman CLI

View as MarkdownOpen in Claude

You can migrate your Newman scripts to use the Postman CLI commands. The Postman CLI is the recommended command-line tool for running collections and interacting with Postman features locally and in CI/CD pipelines.

Newman isn’t compatible with capabilities introduced in Postman v12, including Native Git workflows and the collection v3 format. Because Postman v12 collections in Local View use the v3 format, Newman can’t run collections created or updated in later versions of Postman. To continue running your collections and use these capabilities, migrate from Newman to the Postman CLI.

The following sections outline key differences, migration steps, and command mappings to help you migrate your Newman scripts to the Postman CLI.

Newman limitations

The following capabilities require the Postman CLI and aren’t supported in Newman:

  • Feature support — The Postman CLI supports many Postman features, including collections, monitors, mock servers, flows, and more. Newman only supports running collections.
  • Native Git workflows — The Postman CLI supports Native Git workflows, enabling you to iterate on your APIs locally and push changes to the Postman cloud. Newman doesn’t support pushing local changes to the Postman cloud.
  • Collection format — The Postman CLI supports all collection formats. This includes the new v3 YAML format that’s required for Native Git workflows in Postman v12 and later. Newman only supports the v2.1 JSON format.

Migrate from Newman to the Postman CLI

To migrate your scripts, replace your existing Newman commands with their equivalent Postman CLI commands. Use the postman collection run command to run collections with the Postman CLI, which has a similar set of options and syntax. Learn about mapping Newman commands to the Postman CLI.

For existing collections in your repository, use the postman collection migrate command to convert them to the new v3 format, making them compatible with Native Git workflows.

After you connect your Git project to your workspace, collections created in Local View are automatically stored in v3 format.

Command mapping between Newman and the Postman CLI

The following table maps common Newman commands to their equivalent Postman CLI commands:

ActionNewman commandPostman CLI command
Run a collectionnewman run <collection>postman collection run <collection>
Run with an environmentnewman run <collection> -e <environment>postman collection run <collection> -e <environment>
Run with globalsnewman run <collection> -g <globals>postman collection run <collection> -g <globals>
Specify reportersnewman run <collection> -r cli,jsonpostman collection run <collection> -r cli,json