Skip to main content

CLI for browsing Postman collections, requests, and environments. Ships as an AI agent skill/plugin for Claude Code, Cursor, Codex, and OpenClaw.

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 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

  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.

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

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.2.1.tar.gz (755.2 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.2.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pmctl-0.2.1.tar.gz
  • Upload date:
  • Size: 755.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.30

File hashes

Hashes for pmctl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a172eaf722b5023d43762cb35fe41d9b1a412df284fa1ca610cc86da864d96e1
MD5 fd238c1c64b6dc4e3fb07888d6ce5687
BLAKE2b-256 cc7aa627cf3243b604e022515a7702079e3cea292e98cb3769c5add529284deb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pmctl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.30

File hashes

Hashes for pmctl-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 758c79db82c4b8ea0c7912372218f6acc861a6baa8e2c6c163ca2a6d86be9902
MD5 01195c9a8206f82cdf3b4c9b9f31f6dc
BLAKE2b-256 7a0b62a55b9b4abf0f6e923a311cac7f7fcba0e99fa4e6a3b731c37dc7f50110

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