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/wbingli/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
- Go to Postman API Keys
- Click Generate API Key
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmctl-0.1.1.tar.gz.
File metadata
- Download URL: pmctl-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31492e3fb1513c630e77aaa0ae9dbe70428ca6246503578fb01241b8c073dc1f
|
|
| MD5 |
7f06949073522f3494f46ea4c4b7848e
|
|
| BLAKE2b-256 |
c305e2bbd9ffb7237f90d2073f36fd9dbc0f3f77ba5d2e7224b25692f37647f9
|
File details
Details for the file pmctl-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pmctl-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743c13a4e1d3097e248a3d7ebc56e3308b3c1be7cbe8a731f205b6bb11664699
|
|
| MD5 |
8797a621dbbfd1238bbc4e6f1ce286d6
|
|
| BLAKE2b-256 |
fcdd37f4cf5dd7a977f9c8662a6e6d13630bebfb560c0ae0c13e963d847f8e50
|