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 use the Postman desktop app, you can also install the Postman CLI from the app. Click Help > Postman CLI and Plugins > Install Postman CLI. To learn more, see Install with the Postman desktop app.

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 run Postman CLI commands when using Native Git. The built-in terminal includes its own copy of the Postman CLI, so you can run commands there before you install the Postman CLI. After you install the Postman CLI, the built-in terminal uses your installed copy.

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