Skip to navigation

Postman CLI overview

View as Markdown

The Postman CLI (postman) is Postman’s official, signed command-line tool for running and managing collections, specifications, mocks, and other Postman elements from your terminal, coding agents, or CI/CD pipeline.

Install

npm install -g postman-cli

For update, uninstall, and troubleshooting instructions, see Install the Postman CLI.

If you’ve installed the Postman desktop app, the Postman CLI is installed with it. You can use Postman from your terminal and from coding agents without a separate download.

Quickstart

  1. Sign in, or set up a project without an account:

    postman login

    or

    postman init
  2. Run a collection:

    postman collection run <path-or-id>
  3. Lint an API specification against your team’s governance rules:

    postman spec lint <path-or-id>
  4. Get machine-readable output for a script or an agent:

    postman workspace list --json

What you can do

Availability of some Postman CLI commands depends on your Postman plan.

Setup and account

Workspace elements

Mocks, tests, and monitoring

Automation and generation

AI and agents

Legacy (Postman v11)

Use the built-in terminal in the Postman desktop app to quickly run Postman CLI commands when using Native Git.

For agents and CI

The Postman CLI supports non-interactive use, machine-readable --json output on many commands, and event reporting you can turn off with --no-report-events. For agent-specific context and code generation, see postman describe.

Next steps