Use the Postman CLI with AI agents and CI/CD
The Postman CLI (postman) is designed to run unattended in a coding agent’s shell, a script, or a CI/CD pipeline, without a person present to answer prompts or read formatted terminal output.
Non-interactive use
Pass -y or --yes to skip the confirmation prompt that destructive or interactive commands would otherwise show, such as postman workspace delete, postman mock delete, or postman dataset delete. Read-only commands don’t prompt, so they don’t need this option.
For authentication without a browser, use --with-api-key on postman login, or pass an API key directly with --api-key/--postman-api-key or the POSTMAN_API_KEY environment variable — see Credential precedence.
postman init needs no authentication at all and is safe to run in CI unattended.
Machine-readable output
Options to produce machine-readable output vary by command. See the full global options table for exact coverage and exceptions:
--jsonon commands that support it.-r, --reporters jsononpostman collection run.-o, --output jsononpostman spec lint.
Exit codes
Most commands use exit code 0 for success and a non-zero code for failure. A handful of commands document a full numbered set — see the exit codes table for the complete, verified list.
Event reporting
Several commands report their run events to the API Catalog and Application Inventory by default. Pass --no-report-events to turn this off for a single invocation. See each command’s reference for support details.
Give agents context
Three commands exist specifically to give a coding agent context about your Postman elements:
postman describeaggregates the information a coding agent needs to generate accurate code against your API.postman context-graph askanswers natural-language questions about your team’s APIs and their dependencies.postman skillschecks and updates the agent skills installed in a repository, whichpostman initinstalls automatically.
Manage the Postman plugin and discovery hints
The postman agent commands set up your coding agents to work with the Postman CLI:
postman agent plugins installinstalls the Postman plugin for coding agents in the compatible agents it detects. Usepostman agent plugins statusto check the installation andpostman agent plugins removeto remove it. Some agents require manual installation or removal steps. The command shows those steps and reports when setup is incomplete.postman agent discovery-hints addadds a hint about the Postman CLI to Claude Code and Codex. Usepostman agent discovery-hints statusto check the hint andpostman agent discovery-hints removeto remove it. Add and remove save your choice for later installs and updates.
Plugin install and remove ask for confirmation. Pass --yes when you run them without a terminal, or --dry-run to preview the changes. Both accept --agent <id> to act on one agent and --timeout <ms> to set the installer timeout, which defaults to 5 minutes. Plugin status and all discovery-hints commands accept --json.
A fresh interactive installation with the Unix install script asks whether to add the discovery hint when you haven’t already saved a choice or added a hint. CI and other non-interactive installations skip the hint unless you explicitly add it. The choice is saved in ~/.postman/installation-preferences for later installs and updates. Pass --skip agent-discovery-hints to save an opt-out, or --force agent-discovery-hints to add the hint, including in CI. The Windows PowerShell installer uses -Skip agent-discovery-hints and -Force agent-discovery-hints instead.
Related integrations
Other tools that can be used by coding agents in tandem with the Postman CLI include the following:
- The Postman plugin for coding agents adds Postman-specific instructions to an agent’s context.
- Native Git documents how a coding agent can set up and work with a Postman-connected repository using
postman init, without the Postman desktop app.
The llms.txt and .md endpoints
Every page on this site, including this one, can be fetched as clean Markdown by appending .md to its URL — useful for feeding a specific page to an agent without HTML markup. For a complete index of the documentation, fetch https://learning.postman.com/llms.txt.
Next steps
- Browse commands and global options.
- See Authenticate and configure the Postman CLI for credential and region details.