Skip to main content

A CLI tool for managing Postman collections, environments, and workspaces

Project description

pmctl

A CLI tool for managing Postman collections, environments, and workspaces.

The official Postman CLI only supports running collections. pmctl fills the gap by wrapping the Postman API to let you browse and manage your Postman resources from the terminal.

Features

  • 🔑 Multi-profile support — manage multiple Postman accounts (personal, work, etc.)
  • 📦 Browse collections — list and inspect collections with a beautiful tree view
  • 🌍 Environments — list environments and view variables
  • 🏢 Workspaces — list all accessible workspaces
  • 🎨 Rich output — colored tables and trees powered by Rich

Installation

pip install pmctl

Or install from source:

git clone https://github.com/wbinglee/pmctl.git
cd pmctl
pip install -e .

Quick Start

1. Add a profile

# Add your Postman API key (get one at https://go.postman.co/settings/me/api-keys)
pmctl profile add personal --api-key "PMAK-..." --label "Personal Account" --default

# Add another profile (e.g., work account)
pmctl profile add work --api-key "PMAK-..." --label "Work Account"

2. Browse your resources

# List collections
pmctl collections list

# List collections in a specific workspace
pmctl collections list --workspace <workspace-id>

# Show all requests in a collection (tree view)
pmctl collections show <collection-uid>

# List environments
pmctl environments list

# Show environment variables
pmctl environments show <env-id> --values

# List workspaces
pmctl workspaces list

3. Switch between profiles

# Switch default profile
pmctl profile switch work

# Or use --profile flag on any command
pmctl collections list --profile personal

# Check who you're logged in as
pmctl profile whoami

Profile Management

pmctl profile list          # List all profiles
pmctl profile add <name>    # Add a new profile
pmctl profile remove <name> # Remove a profile
pmctl profile switch <name> # Set default profile
pmctl profile whoami        # Show current user info

Configuration

Profiles are stored in ~/.config/pmctl/config.toml:

[profiles.personal]
api_key = "PMAK-..."
label = "personal@example.com"

[profiles.work]
api_key = "PMAK-..."
label = "work@company.com"

default_profile = "work"

Getting a Postman API Key

  1. Go to Postman API Keys
  2. Click Generate API Key
  3. Copy the key and add it with pmctl profile add

Note: If you have multiple Postman accounts (e.g., personal + company SSO), each account has its own API keys page. Log into the correct account first.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pmctl-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pmctl-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pmctl-0.1.0.tar.gz.

File metadata

  • Download URL: pmctl-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pmctl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85b0d5a48ce5dbdf2ad4c552f67c5f0992b4283e5e7da945add0c7c2c57ead64
MD5 b630eaf0efe3b1fa7fb92a9ace746739
BLAKE2b-256 4bcbae99b5f7108e138838f5af0e03bf7482e957d68d82c9e7652aa3e5b8c095

See more details on using hashes here.

File details

Details for the file pmctl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pmctl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pmctl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cf05329dfc8ec524489c3290d1a0f00914a244be65bdda2e41dc7d8369b2181
MD5 bb22a4ccee4fa558c1314a1de6c794ae
BLAKE2b-256 0d99d9c380140a38e14d8fc628e50f6851e0ae541a2ff2dd6b56fde2de67f3b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page