Query Context Graph with the Postman CLI
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.
Query the graph
To query Context Graph with the Postman CLI, do the following:
-
Ask a question and wait for the answer:
-
(Optional) If you submit a question without
--wait, the command returns an ask ID. To get the answer later, check the ask withpostman context-graph status:
For all the options, see Postman CLI context-graph commands.