> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# CLI commands for coding agents

This topic covers the `postman context` command for coding agents such as Claude Code.

## `postman context`

The `postman context` command aggregates all the information that a coding agent needs to generate accurate code. To use the command, you need to prompt your coding agent to use the Postman CLI to perform a specific task. For example, you can ask your coding agent to generate code for a specific API endpoint and use the `postman context` command as a starting point to get an overview of what it can do. The coding agent then uses the command to gather all the necessary information about the API endpoint, such as the request method, URL, headers, and body.

To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

`postman context instructions [topic]`

Optional topic that scopes the instructions returned to the coding agent. Supported topics include the following:

* `discovery` — Search for and explore APIs.
* `code-generation` — Generate client code.
* `maintenance` — Maintain and update client code.

Without a topic, the command returns a complete overview of the Postman CLI capabilities, workflow, and API reference.

### Use the `postman context` command with coding agents

Prompt your coding agent to use the Postman CLI to perform a task and tell it to run the `postman context` command first to get the necessary context. You can then ask follow-up questions or give it more tasks related to the same API.

For example:

```text wordWrap

Search for payment APIs using the Postman CLI and help me select one and generate client code for it. Run the `postman context instructions` command first.
```