For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Postman
PricingEnterprise
Contact SalesSign InSign Up for Free
HomeDocs
HomeDocs
      • Overview
      • Use generated CLIs
      • Use generated CLIs with AI agents
Postman API Platform

Product

  • Postman Overview
  • Enterprise
  • Spec Hub
  • Flows
  • Agent Mode
  • API Catalog
  • Fern
  • Postman CLI
  • Integrations
  • Workspaces
  • Plans and pricing

API Network

  • App Security
  • Artificial Intelligence
  • Communication
  • Data Analytics
  • Database
  • Developer Productivity
  • DevOps
  • Ecommerce
  • eSignature
  • Financial Services
  • Payments
  • Travel

Resources

  • Postman Docs
  • Academy
  • Community
  • Templates
  • Intergalactic
  • Videos
  • MCP Servers

Legal and Security

  • Legal Terms Hub
  • Terms of Service
  • Postman Product Terms
  • Security
  • Website Terms of Use

Company

  • About
  • Careers and culture
  • Contact us
  • Partner program
  • Customer stories
  • Student programs
  • Press and media
Twitter iconLinkedIn iconGithub iconYouTube iconInstagram iconDiscord icon
Download Postman
Privacy Policy

© 2026 Postman, Inc.

On this page
  • Permissions required to generate CLIs
  • Generate CLIs from collections and API specifications
  • Next steps
Postman CLI Generator

Generate CLI from your collection or specification

||View as Markdown|
Was this page helpful?
Previous

Automate SDK updates with Postman and GitHub

Next

Use generated CLIs

Built with

Generate a command-line interface (CLI) tool directly from your Postman Collections or API specifications. The CLI generator creates a Go-based command-line tool that provides terminal access to every operation in your API, complete with authentication, configuration management, and AI agent integration.

The Postman CLI generator transforms your API specifications into a fully functional command-line tool that does the following:

  • Wraps your API operations in an intuitive command structure.
  • Handles authentication automatically (Basic, API Key, OAuth).
  • Manages configuration through files and environment variables.
  • Provides comprehensive help for every command and flag.
  • Generates AI agent skills for seamless automation integration.
  • Supports all parameter types including request bodies and file uploads.

Permissions required to generate CLIs

You must have Editor or higher access to the collection or specification to generate a CLI. Viewers can view and download existing CLIs, but they can’t generate new ones. Learn more about Postman roles and permissions.

Generate CLIs from collections and API specifications

You can use the Postman CLI or the Postman app to generate your CLI.

Generate CLIs from the Postman CLI

  1. Get the collection or specification ID. In Postman, open your collection or specification, then click Right Sidebar Hidden icon Show right sidebar on the bottom right to open the right sidebar. Click Info icon Info in the right sidebar and copy the ID to use with the postman sdk generate command in the next step.

  2. Run the postman sdk generate command with the pasted ID. For example, to generate a CLI, use the following command with your ID and output directory:

    $postman sdk generate <id or path> --language cli

    Your generated CLI is written to the directory specified by --output-dir (or ./sdks by default).

    You can navigate to the generated files from your terminal and build the CLI using go mod tidy, then go build .

Generate CLIs from the Postman app

  1. Expand Collections or Specifications in the sidebar to select the collection or specification for which you want to generate a CLI.

  2. Click Options icon View more actions and select More > Generate SDKs from a collection or specification.

  3. Name your CLI build. You can use the default name or enter a custom one.

    Name your CLI build
  4. Select CLI as your generation type. This will create a Go-based command-line interface with all your API operations.

    Do this with AI

    Generate CLIs using AI. Open the right sidebar and start a new chat. Ask the agent to generate a CLI for you. For example, you can say “Generate a CLI for this collection.”

  5. Click Generate CLI.

  6. Click Download to download the generated CLI as a zip file. The zip file contains the complete CLI source code, which you can build and integrate into your workflow.

    Download a CLI

The CLI generator creates a complete project structure containing:

  • API commands for all your API operations.
  • Go source code for customization and building.
  • AI agent skills for each command in Markdown format.
  • Authentication setup for all supported auth methods.
  • Configuration management with file and environment variable support.
  • Comprehensive documentation including usage examples.

To regenerate your CLI or generate new ones with different configurations, click Regenerate SDKs.

You can access your CLIs in the left sidebar. Click SDKs to see all your generated SDKs and CLIs.

Next steps

After generating your CLI:

  1. Install and build your generated CLI from the source code.
  2. Set up authentication using the setup-auth command for your API.
  3. Configure settings like base URLs using the config command.
  4. Learn CLI commands and use --help to explore available operations.
  5. Explore AI agent skills for automation and integration workflows.
  6. Learn about AI agent integration to understand how agents can use your CLI autonomously.