***
title: SDK CLI commands
updated: 2026-02-04T00:00:00.000Z
max-toc-depth: 2
----------------
The Postman CLI enables you to generate, download, sync, list, and configure SDKs directly from your Postman entities. To use the commands, [install](/docs/postman-cli/postman-cli-installation/) the command-line companion for Postman. You can use it from your command line or Postman terminal.
## postman sdk init
The `postman sdk init` command creates or updates the `.postman/config.json` file with your SDK configuration. For more information, see [Create and manage the Postman SDK config file](/docs/sdk-generator/configure/overview/#create-and-manage-the-postman-sdk-config-file).
### Usage
```bash
postman sdk init [options]
```
### Options
Skip prompts and overwrite the existing Postman SDK config file.
Display help for the command.
## postman sdk generate
The `postman sdk generate` command generates a new SDK from a Postman collection or specification. This action downloads the generated SDKs and unzips them into the output directory or GitHub repo, if connected. If you encounter errors, see [Generate commands errors and warnings](/docs/sdk-generator/troubleshoot/#generate-command-errors-and-warnings).
### Usage
```bash
postman sdk generate [options]
```
One of the following:
* A Postman Collection ID or Specification ID (UUID format).
* A file path to a collection (.json) or specification (.json, .yaml, .yml) file.
* A URL to a publicly accessible collection or specification file.
When using an ID, the SDK generation updates the version in Postman Cloud. The command automatically detects whether the ID is a collection or specification. Only UUIDs are supported (for example, `12345-abcde-67890` or `12345678-1234-1234-1234-123456789012`). To get the collection or specification ID, in Postman, click
**Info** in the right sidebar and copy the ID.
When using a file path or URL, the command creates a one-off build that doesn't update the Postman Cloud version.
### Options
Target language(s) for SDK generation. Specify one or more languages for SDK generation: `typescript`, `python`, or `java`.
Generate SDKs in all supported languages.
Select the directory to save the downloaded SDKs.
Select the name for the generated SDK package.
Select the version number for the generated SDK.
Path to the SDK generation config file (JSON).
Skip prompts and overwrite the existing Postman SDK config file.
Show detailed generation progress and logs.
Create a pull request to the GitHub SDK output repo with the generated SDK.
Display help for the command.
### Examples
#### Generate a TypeScript SDK from a collection ID
```bash wordWrap
postman sdk generate 12345-abcde-67890 --language typescript --output-dir ./my-sdk
```
#### Generate a TypeScript SDK from a specification ID
```bash
postman sdk generate 67890-fghij-12345 --language typescript --output-dir ./my-sdk
```
#### Generate a one-off SDK build from a collection file
```bash
postman sdk generate ./my-collection.json -l typescript -o ./my-sdk
```
#### Generate a one-off SDK build from a specification file
```bash
postman sdk generate ./openapi.yaml -l typescript -o ./my-sdk
```
#### Generate a one-off SDK build from a publicly accessible URL
```bash
postman sdk generate https://petstore.swagger.io/v2/swagger.json -l typescript -o ./my-sdk
```
#### Generate SDKs in TypeScript and Python
```bash
postman sdk generate 12345-abcde-67890 -l typescript python -o ./sdks
```
#### Generate SDKs in all supported languages
```bash
postman sdk generate 12345-abcde-67890 --all -o ./sdks
```
#### Generate and auto-overwrite the existing SDKs
```bash
postman sdk generate 12345-abcde-67890 -l typescript --yes -o ./sdks
```
#### Verbose generation
```bash
postman sdk generate 12345-abcde-67890 -l java --verbose
```
#### Show detailed generation progress and logs
```bash
postman sdk generate 12345-abcde-67890 -l java --verbose
```
#### Generate and push an SDK build to your repo
```bash
postman sdk generate 12345-abcde-67890 -l python --pr
```
You must [connect your GitHub repo](/docs/sdk-generator/sdk-cli/#postman-sdk-connect-github) to be able to push your SDK builds to it.
## postman sdk list
The `postman sdk list` command lists builds for a specific collection. If you encounter errors, see [List commands errors](/docs/sdk-generator/troubleshoot/#list-command-errors).
### Usage
```bash
postman sdk list|ls [options]
```
Postman Collection ID in the `12345-abcde-67890` format.
### Options
Filter builds by status with one of these choices: `IN_PROGRESS`, `SUCCESS`, or `FAILURE`.
Select the output format with one of these choices: `json` or `table`.
Display help for the command.
### Examples
#### List all builds for a collection
```bash
postman sdk list 12345-abcde-67890
```
#### List only successful builds
```bash
postman sdk list 12345-abcde-67890 --status SUCCESS
```
#### List in-progress builds
```bash
postman sdk list 12345-abcde-67890 --status in-progress
```
#### List failed builds
```bash
postman sdk list 12345-abcde-67890 --status failure
```
#### Output as JSON
```bash
postman sdk list --output json
```
## postman sdk fetch
The `postman sdk fetch` command lets you download previously generated SDKs from a build by its ID, so that you can retrieve and use them locally. If you encounter errors, see [Get/Fetch commands errors](/docs/sdk-generator/troubleshoot/#getfetch-command-errors).
### Usage
```bash
postman sdk fetch|get|download [options]
```
### Options
Select the directory to save the downloaded SDKs.
Target language(s) for SDK generation. Specify one or more languages for SDK generation: `typescript`, `python`, or `java`.
Overwrite existing files without confirmation.
Show detailed generation progress and logs.
Display help for the command.
### Examples
#### Download SDKs from a build
```bash
postman sdk get 12345
```
#### Download SDKs to a specific directory
```bash
postman sdk fetch 12345 --output-dir ./my-sdks
```
#### Overwrite the existing files
```bash
postman sdk download 12345 --overwrite
```
#### Download SDKs in a specific language
```bash
postman sdk fetch 12345 --language typescript
```
#### Download SDKs in several languages
```bash
postman sdk fetch 12345 --l java typescript
```
## postman sdk connect github
The `postman sdk connect github` command creates a Git integration that allows you to sync your generated SDK with your GitHub repo. If you encounter errors, see [Connect commands errors](/docs/sdk-generator/troubleshoot/#connect-command-errors).
Learn how to [generate an SDK in a specific language and sync it with your GitHub project](/docs/sdk-generator/generate/#generate-an-sdk-in-a-specific-language-and-sync-it-with-your-github-project).
### Usage
```bash
postman sdk connect github [options]
```
Postman Collection ID in the `12345-abcde-67890` format.
### Options
Target language(s) for SDK generation. Specify one or more languages for SDK generation: `typescript`, `python`, or `java`.
If the system is unable to identify the workspace the collection is tied to, pass a workspace ID.
Display help for the command.
### Examples
#### Connect a collection with a TypeScript SDK output
```bash
postman sdk connect github 12345-abcde-67890 --language typescript
```
#### Connect with a specific workspace
```bash
postman sdk connect github 12345-abcde-67890 -l python -w my-workspace-id
```