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 with default workspaces
- 📦 Browse collections — list collections and inspect with tree view
- 🔍 Request browser — list, search (fuzzy match), and inspect individual requests across collections
- 🌍 Environments — list environments and view variables by name or ID
- 🏢 Workspaces — list and search workspaces
- 🐚 Shell completion — tab completion for bash, zsh, and fish
- 🎨 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 "<your-api-key>" --label "Personal Account" --default
# Add another profile (e.g., work account)
pmctl profile add work --api-key "<your-api-key>" --label "Work Account"
2. Set a default workspace
# Set default workspace for your profile (so list commands scope to it automatically)
pmctl profile set-workspace <workspace-id>
3. Browse your resources
# List collections (scoped to default workspace)
pmctl collections list
# List collections from all workspaces
pmctl collections list --all
# Show all requests in a collection (tree view)
pmctl collections show <collection-uid>
# List all requests in a collection (flat table, by name or UID)
pmctl requests list --collection "My Collection"
pmctl requests list -c <collection-uid>
# Fuzzy search requests (characters matched in order, e.g. "crtUsr" matches "Create User")
pmctl requests list -c "My Collection" --search "getUser"
# Inspect a specific request by name
pmctl requests show "Create User" --collection "My Collection"
# JSON output for scripting
pmctl requests list -c "My Collection" --json
pmctl requests show "Create User" -c "My Collection" --json
# List environments
pmctl environments list
# Show environment variables (by name or ID)
pmctl environments show "My Environment"
pmctl environments show <env-id>
# List workspaces
pmctl workspaces list
# Search workspaces by name
pmctl workspaces list --search "keyword"
4. 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 set-workspace <workspace> # Set default workspace for profile
pmctl profile whoami # Show current user info
Configuration
Profiles are stored in ~/.config/pmctl/config.toml:
[profiles.personal]
api_key = "<your-api-key>"
label = "personal@example.com"
[profiles.work]
api_key = "<your-api-key>"
label = "work@company.com"
workspace = "your-workspace-id"
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.
Shell Completion
# Bash
eval "$(pmctl completion bash)"
# Zsh
eval "$(pmctl completion zsh)"
# Fish
pmctl completion fish > ~/.config/fish/completions/pmctl.fish
AI Agent Integrations
pmctl is designed to be used by both humans and AI agents. It ships with skill/plugin definitions for all major AI coding tools.
Claude Code Plugin
This repo is a Claude Code plugin. Install it directly inside Claude Code:
claude plugin marketplace add wbingli/pmctl
claude plugin install pmctl@pmctl
OpenAI Codex Skill
Skills are in .agents/skills/pmctl/SKILL.md following the Agent Skills standard. Codex picks them up automatically when you work inside this repo, or copy the skill folder to ~/.agents/skills/pmctl/ for global access.
Cursor Plugin
This repo is a Cursor plugin. It includes both the plugin manifest (.cursor-plugin/plugin.json) and a skill (skills/pmctl/SKILL.md). Additionally, a rule file at .cursor/rules/pmctl.mdc is auto-loaded when you open this repo.
OpenClaw (ClawHub)
Published on ClawHub:
clawhub install pmctl
Other AI Tools
The skill/SKILL.md file is a standalone skill definition that works with any tool supporting the Agent Skills spec. Copy it into your tool's skill directory.
Publishing to ClawHub
To publish a new version:
# Login (one-time)
clawhub login
# Publish
clawhub publish ./skill --slug pmctl --name "pmctl" --version <version> --changelog "description" --tags latest
License
MIT
Metadata
Release files for pmctl 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pmctl-0.2.1.tar.gz | 755.2 kB | Without provenance | Details for pmctl-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pmctl-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pmctl-0.2.1-py3-none-any.whl |
Total release size: 766.6 kB
Release files / pmctl-0.2.1.tar.gz
| Download URL | pmctl-0.2.1.tar.gz |
|---|---|
| Size | 755.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a172eaf722b5023d43762cb35fe41d9b1a412df284fa1ca610cc86da864d96e1
|
|
BLAKE2b-256 checksum How to use checksums |
cc7aa627cf3243b604e022515a7702079e3cea292e98cb3769c5add529284deb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.30
|
Release files / pmctl-0.2.1-py3-none-any.whl
| Download URL | pmctl-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
758c79db82c4b8ea0c7912372218f6acc861a6baa8e2c6c163ca2a6d86be9902
|
|
BLAKE2b-256 checksum How to use checksums |
7a0b62a55b9b4abf0f6e923a311cac7f7fcba0e99fa4e6a3b731c37dc7f50110
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.30
|
Security for pmctl 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.