postman-cli 0.0.0-alpha.0 → 1.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ <br>
2
+
3
+ <div align="left">
4
+ <a href="https://www.getpostman.com/">
5
+ <img src="https://voyager.postman.com/logo/postman-logo-orange.svg" alt="Postman Logo" width="400" height="200">
6
+ </a>
7
+ </div>
8
+
9
+ <br>
10
+
11
+ # Postman CLI
12
+
13
+ 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.
14
+
15
+ ## Installation
16
+
17
+ ### npm
18
+
19
+ ```bash
20
+ npm install -g postman-cli
21
+ ```
22
+
23
+ ### Alternative Installation Methods
24
+
25
+ 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/)**.
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ # Get help
31
+ postman --help
32
+
33
+ # Sign in to Postman
34
+ postman login
35
+
36
+ # Sign in to Postman and EU region
37
+ postman login --region eu
38
+
39
+ # Sign in using API key
40
+ postman login --with-api-key <api-key>
41
+
42
+ # Sign in using API key and EU region
43
+ postman login --with-api-key <api-key> --region eu
44
+
45
+ # Run a collection
46
+ postman collection run <collection-id>
47
+
48
+ # Run with environment
49
+ postman collection run <collection-id> -e <environment-id>
50
+
51
+ # Run a monitor
52
+ postman monitor run <monitor-id>
53
+
54
+ # Check API governance and security rules
55
+ postman api lint <api-id>
56
+ ```
57
+
58
+ ## Platform Support
59
+
60
+ This package automatically downloads the appropriate binary for your platform:
61
+
62
+ - macOS (Intel & Apple Silicon)
63
+ - Linux (x64)
64
+ - Windows (x64)
65
+
66
+ > **Note:** Linux support excludes Alpine Linux distributions due to libc compatibility requirements.
67
+ For Alpine environments, consider using alternative installation methods or running from a glibc-based base image.
68
+
69
+ ## Resources
70
+
71
+ - **[Complete Documentation](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)** - Full guide with examples and advanced usage
72
+ - **[Installation Guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/)** - All installation methods and platform-specific instructions
73
+ - **[Command Reference](https://learning.postman.com/docs/postman-cli/postman-cli-options/)** - Complete list of commands and options
74
+ - **[Release Notes](https://www.postman.com/release-notes/postman-cli/)** - Latest versions and changelog
75
+
76
+ ## Support
77
+
78
+ - [Postman Support](https://support.postman.com/) – For general support and troubleshooting
79
+ - [GitHub Issues](https://github.com/postmanlabs/postman-app-support/issues) – For bug reports and feature requests
package/bin/postman.js ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ const run = require('../index');
4
+
5
+ try {
6
+ run(...process.argv.slice(2));
7
+ }
8
+ catch (error) {
9
+ process.exit(1);
10
+ }
package/index.js ADDED
@@ -0,0 +1,37 @@
1
+ const { execFileSync } = require('child_process'),
2
+
3
+ PLATFORM_PACKAGES = {
4
+ 'darwin-arm64': 'pm-bin-macos-arm64',
5
+ 'darwin-x64': 'pm-bin-macos-x64',
6
+ 'win32-x64': 'pm-bin-windows-x64',
7
+ 'linux-x64': 'pm-bin-linux-x64'
8
+ };
9
+
10
+ function locateBinary () {
11
+ const platformKey = `${process.platform}-${process.arch}`,
12
+ packageName = PLATFORM_PACKAGES[platformKey];
13
+
14
+ if (!packageName) {
15
+ throw new Error(`Unsupported platform: ${platformKey}`);
16
+ }
17
+
18
+ // eslint-disable-next-line one-var
19
+ const binaryName = process.platform === 'win32' ? 'postman.exe' : 'postman';
20
+
21
+ try {
22
+ return require.resolve(`@postman/${packageName}/bin/${binaryName}`);
23
+ }
24
+ catch (error) {
25
+ throw new Error(
26
+ `Binary not found for ${platformKey}. ` +
27
+ `Make sure @postman/${packageName} is installed. `
28
+ );
29
+ }
30
+ }
31
+
32
+ module.exports = function run (...args) {
33
+ return execFileSync(locateBinary(), args, {
34
+ stdio: 'inherit',
35
+ encoding: 'utf8'
36
+ });
37
+ };
package/package.json CHANGED
@@ -1,11 +1,64 @@
1
1
  {
2
2
  "name": "postman-cli",
3
- "version": "0.0.0-alpha.0",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
3
+ "version": "1.19.4",
4
+ "description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
5
+ "keywords": [
6
+ "postman",
7
+ "cli",
8
+ "api",
9
+ "testing",
10
+ "automation",
11
+ "rest",
12
+ "newman",
13
+ "api-testing",
14
+ "api-development",
15
+ "ci-cd",
16
+ "continuous-integration",
17
+ "postman-cli",
18
+ "api-client",
19
+ "http-client",
20
+ "api-automation",
21
+ "collection-runner",
22
+ "postman-collection",
23
+ "api-governance",
24
+ "api-security",
25
+ "api-linting",
26
+ "api-validation",
27
+ "contract-testing",
28
+ "schema-validation",
29
+ "devops",
30
+ "pipeline",
31
+ "github-actions",
32
+ "gitlab-ci",
33
+ "azure-devops",
34
+ "jenkins",
35
+ "circleci",
36
+ "integration-testing",
37
+ "functional-testing",
38
+ "test-reports",
39
+ "junit-reports",
40
+ "html-reports",
41
+ "postman-automation",
42
+ "postman-testing",
43
+ "postman-runner",
44
+ "postman-monitor",
45
+ "rest-api",
46
+ "http-testing",
47
+ "api-tools"
48
+ ],
49
+ "bin": {
50
+ "postman": "bin/postman.js"
8
51
  },
9
- "author": "Shamasis Bhattacharya <mail@shamasis.net> (=)",
10
- "license": "Apache-2.0"
52
+ "files": [
53
+ "bin/",
54
+ "index.js",
55
+ "package.json",
56
+ "README.md"
57
+ ],
58
+ "optionalDependencies": {
59
+ "@postman/pm-bin-macos-arm64": "1.19.4",
60
+ "@postman/pm-bin-macos-x64": "1.19.4",
61
+ "@postman/pm-bin-linux-x64": "1.19.4",
62
+ "@postman/pm-bin-windows-x64": "1.19.4"
63
+ }
11
64
  }