Installation
Install the Portman CLI locally in your project, globally with npm, or run it without installing using npx.
Portman is distributed as the npm package @apideck/portman. You can add it to a project (recommended), install it globally, or run it on demand with npx.
Local installation (recommended)
Add the Portman CLI to your project's node_modules:
npm install --save @apideck/portmanor with yarn:
yarn add @apideck/portmanRun a locally installed Portman with npx:
npx @apideck/portman -l your-openapi-file.yamlWith an older version of npm, call the binary directly:
./node_modules/.bin/portman -l your-openapi-file.yamlA local install pins the Portman version in your package.json, so everyone on the team and your CI pipeline generate the same collection.
Global installation
npm install -g @apideck/portmanAfter a global install the portman command is available everywhere:
portman -l your-openapi-file.yamlRun with npx
To execute the CLI without installing it, use npx:
npx @apideck/portman -l your-openapi-file.yamlCheck the installation
portman --versionportman --help--help prints the full list of options. They are also documented in CLI options.
Next steps
- Quickstart: generate your first collection with contract tests.
- Postman sync: a Postman account is only needed if you want Portman to upload the collection for you.