Skip to navigation

Query Context Graph with the Postman CLI

View as Markdown

You can query Postman Context Graph from your terminal with the Postman CLI’s postman context-graph ask command. Ask natural-language questions, such as what depends on a given API, and get answers grounded in your team’s graph. Coding agents such as Claude Code, Codex, and Cursor can run the same commands from your repository.

Prerequisites

  • Context Graph enabled for your team. Check with your Postman admin.
  • The Postman CLI, signed in with postman login. The team a query runs against comes from your credentials.

Set up your repository with postman init

To use Context Graph from a coding agent, run postman init in your repository first. It sets up a Postman project and installs Postman’s agent skills, which give your coding agent the information it needs to work with the Postman CLI.

postman init

Query the graph

To query Context Graph with the Postman CLI, do the following:

  1. Ask a question and wait for the answer:

    postman context-graph ask "What depends on billing-api?" --wait
  2. (Optional) If you submit a question without --wait, the command returns an ask ID. To get the answer later, check the ask with postman context-graph status:

    postman context-graph status <ask-id>

For all the options, see Postman CLI context-graph commands.