postman-cli
Version:
Official Postman CLI - Command-line companion for API development, testing, and automation
83 lines (53 loc) • 3.16 kB
Markdown
<br>
<div align="left">
<a href="https://www.getpostman.com/">
<img src="https://voyager.postman.com/logo/postman-logo-orange.svg" alt="Postman Logo" width="400" height="200">
</a>
</div>
<br>
# Postman CLI
The Postman CLI brings the power of Postman’s API platform directly to your terminal. It lets you run collections, automate tests, integrate API checks into CI/CD pipelines, and enforce quality gates — all with a single, lightweight command-line tool. Whether you’re debugging locally, scaling systems, or embedding API workflows into your build system, the Postman CLI helps you bridge the gap between collaborative API design in Postman and automated execution in your development and production environments.
## Installation
### npm
```bash
npm install -g postman-cli
```
### Alternative Installation Methods
For direct binary downloads, platform-specific installers, or other installation methods, see the **[Installation Guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/)**.
## Usage
```bash
# Get help
postman --help
# Sign in to Postman
postman login
# Sign in to Postman and EU region
postman login --region eu
# Sign in using API key
postman login --with-api-key <api-key>
# Sign in using API key and EU region
postman login --with-api-key <api-key> --region eu
# Run a collection
postman collection run <collection-id>
# Run with environment
postman collection run <collection-id> -e <environment-id>
# Run a monitor
postman monitor run <monitor-id>
# Check API governance and security rules
postman api lint <api-id>
```
## Platform Support
This package automatically downloads the appropriate binary for your platform:
- macOS (Intel & Apple Silicon)
- Linux (x64)
- Windows (x64)
> **Note:** Linux support excludes Alpine Linux distributions due to libc compatibility requirements.
## Troubleshooting Installation
The Postman CLI relies on platform-specific binaries distributed as optional dependencies. If you encounter "Binary not found" errors, ensure you're not using `--no-optional` or `--omit=optional` flags during installation, and verify that your `.npmrc` configuration doesn't contain `optional=false`. Installation failures may also occur due to network/registry access issues blocking `@postman/*` scoped packages or when using an unsupported platform architecture.
## Resources
- **[Complete Documentation](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)** - Full guide with examples and advanced usage
- **[Installation Guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/)** - All installation methods and platform-specific instructions
- **[Command Reference](https://learning.postman.com/docs/postman-cli/postman-cli-options/)** - Complete list of commands and options
- **[Release Notes](https://www.postman.com/release-notes/postman-cli/)** - Latest versions and changelog
## Support
- [Postman Support](https://support.postman.com/) – For general support and troubleshooting
- [GitHub Issues](https://github.com/postmanlabs/postman-app-support/issues) – For bug reports and feature requests