Getting started

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.

Add the Portman CLI to your project's node_modules:

bash
npm install --save @apideck/portman

or with yarn:

bash
yarn add @apideck/portman

Run a locally installed Portman with npx:

bash
npx @apideck/portman -l your-openapi-file.yaml

With an older version of npm, call the binary directly:

bash
./node_modules/.bin/portman -l your-openapi-file.yaml

A 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

bash
npm install -g @apideck/portman

After a global install the portman command is available everywhere:

bash
portman -l your-openapi-file.yaml

Run with npx

To execute the CLI without installing it, use npx:

bash
npx @apideck/portman -l your-openapi-file.yaml

Check the installation

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