Install the Postman CLI
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.
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.
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. Where the script installs the postman binary depends on your system. If the /usr/local directory is writable without sudo, as it is for the root user, in most containers, and on hosted CI runners, the script installs to /usr/local/bin. Otherwise, it installs to $HOME/.local/bin, creating the directory if needed. Either way, the script doesn’t prompt for sudo.
At the install location, the script writes the new binary over whatever bin/postman is already there. When that path is a symlink, such as one left by an earlier install to a different location, the script replaces the symlink itself and leaves the file it pointed to unchanged.
Whichever location the script installs to, the Postman CLI is also reachable at $HOME/.local/bin/postman. When the script installs the binary somewhere else, it adds a symlink at that path pointing to the binary, so callers such as the Postman desktop app can check one fixed path. If a binary or symlink is already there, the script leaves it in place.
If the installed binary doesn’t print a version, the script ends with an error.
/usr/local/bin is on the default PATH of most systems, so a /usr/local install makes the postman binary available in later CI steps and Docker RUN lines, which don’t read shell startup files. To keep a user-local install even when /usr/local is writable, set POSTMAN_CLI_SYSTEM_INSTALL=0.
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.
For scripted installs, each flag can also be set as an environment variable instead: POSTMAN_CLI_INSTALL_PREFIX, POSTMAN_CLI_SYSTEM_INSTALL=1 (or =0 to keep a user-local install), 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, the default install needs no extra setup because hosted runners make /usr/local writable, and /usr/local/bin is already on PATH. If the install falls back to $HOME/.local, add $HOME/.local/bin to your PATH environment variable to make the postman binary available in later steps of your CI workflow (on GitHub Actions, echo "$HOME/.local/bin" >> "$GITHUB_PATH").
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:
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 /usr/local/bin or $HOME/.local/bin, depending on where the script installed it. If $HOME/.local/bin/postman is a symlink to the binary, delete the symlink too.
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:
-
Run one of the following commands, depending on your system:
-
For macOS, Linux, or WSL, run
which postman. -
For Windows, run
where postman.
-
-
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.