> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Use the Postman CLI with AI agents and CI/CD

> Run the Postman CLI non-interactively in scripts, CI/CD pipelines, and coding agents, with machine-readable output, exit codes, and links to Postman's other agent integrations.

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`](/docs/postman-cli/postman-cli-workspace/#postman-workspace-delete), [`postman mock delete`](/docs/postman-cli/postman-cli-mock/#postman-mock-delete), or [`postman dataset delete`](/docs/postman-cli/postman-cli-datasets/#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`](/docs/postman-cli/postman-cli-auth/#postman-login), or pass an API key directly with `--api-key`/`--postman-api-key` or the `POSTMAN_API_KEY` environment variable — see [Credential precedence](/docs/postman-cli/postman-cli-authenticate-and-configure/#credential-precedence).

[`postman init`](/docs/postman-cli/postman-cli-init/#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](/docs/postman-cli/postman-cli-options/#global-options) for exact coverage and exceptions:

* `--json` on commands that support it.
* `-r, --reporters json` on [`postman collection run`](/docs/postman-cli/postman-cli-collections/#postman-collection-run).
* `-o, --output json` on [`postman spec lint`](/docs/postman-cli/postman-cli-governance/#postman-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](/docs/postman-cli/postman-cli-options/#exit-codes) 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](/docs/postman-cli/postman-cli-options/#global-options) 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](/docs/postman-cli/postman-cli-options/#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 describe`](/docs/postman-cli/postman-cli-describe/#postman-describe) aggregates the information a coding agent needs to generate accurate code against your API.
* [`postman context-graph ask`](/docs/postman-cli/postman-cli-context-graph/#postman-context-graph-ask) answers natural-language questions about your team's APIs and their dependencies.
* [`postman skills`](/docs/postman-cli/postman-cli-skills/#postman-skills-status) checks and updates the agent skills installed in a repository, which [`postman init`](/docs/postman-cli/postman-cli-init/#postman-init) installs 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](/docs/reference/developer-resources/postman-plugin/) adds Postman-specific instructions to an agent's context.
* [Native Git](/docs/use/native-git/overview/) 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](https://learning.postman.com/llms.txt).

## Next steps

* Browse [commands and global options](/docs/postman-cli/postman-cli-options/).
* See [Authenticate and configure the Postman CLI](/docs/postman-cli/postman-cli-authenticate-and-configure/) for credential and region details.