Skip to navigation

Install the Postman CLI

View as Markdown

Install the Postman CLI by following the instructions for your operating system below.

The Postman CLI supports the same system requirements as the Postman desktop app. For a complete list of requirements, see Install and update Postman.

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.

npm installation for Windows, macOS, and Linux

If you have Node.js and npm installed on your system, you can run the following command. This will download and install the Postman CLI binary, making the postman command available in your terminal.

npm install -g postman-cli

Alternatively, you can also install the Postman CLI binary with a script specific to Windows. You can also use curl to install the Postman CLI binary on systems running macOS, Linux, or Windows Subsystem for Linux (WSL).

Linux support excludes Alpine Linux distributions due to libc compatibility requirements.

Windows installation

Run the following command to install the Postman CLI for Windows. This will download and run an install script. The script creates a %USERPROFILE%\AppData\Local\Microsoft\WindowsApps directory if it doesn’t exist yet, then installs the postman binary there.

powershell -NoP -NonI -c "irm https://dl-cli.pstmn.io/install/win64.ps1 | iex"

macOS, Linux, and Windows Subsystem for Linux (WSL) installation

Run the following command to install the Postman CLI on systems running macOS, Linux, or Windows Subsystem for Linux (WSL). This will download and run a unified install script that detects your OS and architecture. The install script creates a $HOME/.local/bin directory if it doesn’t exist yet, then installs the postman binary there. This is a user-local install, so it doesn’t prompt for sudo.

curl -o- "https://dl-cli.pstmn.io/install/unix.sh" | sh

Pass --prefix <directory> to install to <directory>/bin/postman instead, or --system to install system-wide (to /usr/local when you don’t also pass --prefix). A system install is the only case that prompts for sudo, and only when the target directory isn’t writable without it. If the target isn’t writable and you didn’t pass --system, the installer fails before downloading anything, with a message naming these flags, instead of escalating to sudo without asking.

# Install to a custom location (installs to /opt/postman/bin/postman)
curl -o- "https://dl-cli.pstmn.io/install/unix.sh" | sh -s -- --prefix /opt/postman
# Install system-wide
curl -o- "https://dl-cli.pstmn.io/install/unix.sh" | sh -s -- --system

For scripted installs, each flag can also be set as an environment variable instead: POSTMAN_CLI_INSTALL_PREFIX, POSTMAN_CLI_SYSTEM_INSTALL=1, and POSTMAN_CLI_NO_MODIFY_PATH=1 for --no-modify-path, which skips editing your shell startup file and prints the export PATH=... line to add yourself instead.

For CI environments, add $HOME/.local/bin to your PATH environment variable to ensure the postman binary is accessible in subsequent steps of your CI workflow.

Update your Postman CLI installation

To update your Postman CLI installation to the latest version, run the same command you used to install it, or run postman update. Both overwrite the earlier version in place. The postman update command performs the installation into the same location the running binary already uses, so a --system or --prefix install updates there instead of installing a second copy elsewhere. For details about the latest changes and features, see the Postman CLI release notes.

Uninstall Postman CLI

If you installed the Postman CLI with npm, you can uninstall it with the following command:

npm uninstall -g postman-cli

If you installed the Postman CLI with any method other than npm, you can uninstall it by deleting the postman binary. For Windows systems, the binary is in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps by default. For macOS, Linux, and WSL systems, the binary is in $HOME/.local/bin by default, or /usr/local/bin if you installed with --system.

Coding agent setup

After installing the Postman CLI, you use the postman init command to set up an AI-ready API project in your local repository. In a single step, it creates the Postman Native Git project structure, adopts an existing API specification if your repository has one, and installs agent skills under postman/skills/, with one SKILL.md per skill and a root AGENTS.md that points agents to them.

For more information, see postman init

Troubleshooting

If you’ve installed the Postman CLI using both npm and the curl-based script, your system may have two copies of the binary. Which binary is active depends on the order of directories in your PATH environment variable.

To check which binary is active, do the following:

  1. Run one of the following commands, depending on your system:

    • For macOS, Linux, or WSL, run which postman.

    • For Windows, run where postman.

  2. Run postman --version.

If you have two copies of the binary in your PATH environment variable, you can resolve the conflict by uninstalling one of the binaries.

Some Postman CLI commands require a valid Postman API key. For more information, see Generate and use Postman API keys.