Use the Postman CLI with AI agents and CI/CD
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.
Usage analytics
Several commands upload their own run results as usage analytics by default. Pass --no-report-events to turn this off for a single invocation — see the global options table for exactly which commands support it.
This is separate from the minimal, anonymous usage event the CLI records for many commands regardless of this option. See Usage analytics on the commands and options page for what that event does and doesn’t contain.
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.
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.