portle

1.0.5 • Public • Published

The Portle CLI

Portle Logo

Welcome to the Portle CLI page. This CLI makes it possible to create automations that will keep your API documentation in sync with your code. This CLI is to be used in conjunction with the Portle Web Application

Installation

You can install the CLI on your machine:

npm install -g portle

Or you can directly use the CLI using npx, which is the recommended way.

Getting the API_KEY

  • Log into your account on the Portle Web Application
  • Go to Workhub on the left sidebar
  • Select the Product for which you want to fetch the API Key
  • Click on the edit button on the right side of your product name
  • Go to the "Tokens and Keys" tab
  • You will see your API Key here

Getting the PRODUCT_ID

  • Log into your account on the Portle Web Application
  • Go to Workhub on the left sidebar
  • Select the relevant Product
  • Select the Version in the version dropdown for which you want to fetch the PRODUCT_ID
  • The value of the query parameter product_id on your browser URL is the PRODUCT_ID

Adding/Replacing your API Reference

  • You will use the following command for this use case:
npx portle openapi -k <API_KEY> -p <PRODUCT_ID> <FILE_PATH>
  • FILE_PATH represents the local filepath where your JSON file is located.

Example:

npx portle openapi -k d20548c1-f835-49e3-b94b-ebfd106e10f5 -p 1296 ./../swagger.json

Package Sidebar

Install

npm i portle

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

11.2 kB

Total Files

10

Last publish

Collaborators

  • metaron