***
title: Workspace commands
approved: 2026-03-16T00:00:00.000Z
topictype: reference
slug: docs/postman-cli/postman-cli-workspace
max-toc-depth: 2
----------------
This topic covers workspace management commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/).
The Postman CLI includes workspace commands to validate, synchronize, and push local collections, environments, and specifications to Postman workspaces in the cloud. Add the commands to your CI/CD script to automate these tasks during the deployment process. Learn more about [adding workspace commands to your CI/CD pipeline](/docs/agent-mode/native-git#add-a-github-workflow-to-publish-to-postman-cloud).
## `postman workspace prepare`
This command validates and prepares local collections and environments for pushing to a Postman workspace. It checks for valid UUIDs, regenerates IDs if needed, and ensures all items and responses have proper IDs.
### Usage
```bash
postman workspace prepare [options]
```
### Options
Path to the collections directory.
Path to the environments directory.
### Configuration
The command expects a `.postman/resources.yaml` file in your working directory.
Collection and environment paths can be relative (resolved from `.postman/`) or absolute. Only valid JSON files are processed. Invalid paths like empty strings and non-JSON files are automatically filtered with warnings.
### Examples
```bash
postman workspace prepare
```
Learn more at [Native Git workflows](/docs/agent-mode/native-git/).
## `postman workspace push`
This command pushes local collection, environment, and specification changes to your Postman workspace. It synchronizes your local files with the workspace in the Postman cloud, performing create, update, and delete operations as needed.
To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).
### Usage
```bash
postman workspace push [options]
```
### Options
Path to the collections directory.
Path to the environments directory.
Skip the prepare step before pushing.
Skip all confirmation prompts.
### Workflow
1. **Validate** - Checks if the collections, environments, and specifications exist globally and in the target workspace.
2. **Prepare** (unless `--no-prepare`) - Runs prepare automatically if invalid or missing IDs are detected.
3. **Sync** - Creates, updates, or deletes entities to match your local state.
4. **Update Local Files** - After successful creation, updates local files with server-returned IDs.
### Configuration
The command expects a `.postman/resources.yaml` file in your working directory.
If the `resources.yaml` file contains collection, environment, or specification paths, those specific files are used instead of directory scanning.
### Examples
##### Push with automatic prepare and interactive prompts
```bash
postman workspace push
```
##### Push without the prepare step
```bash
postman workspace push --no-prepare
```
##### Automatic push without prompts (useful for CI/CD)
```bash
postman workspace push --yes
```
Learn more at [Native Git workflows](/docs/agent-mode/native-git/).