@fortellis/fortellis-cli
v0.0.1-alpha.10
Published
Command Line for Fortellis API Specs
Readme
fortellis-cli
Getting started
git clone https://github.com/Fortellis/fortellis-cli.git
cd fortellis-cli
npm install
In order for the "fortellis-cli" command to work on a machine where it is installed, you need to link the command with the following command.
npm link
Command Line for Fortellis API Specs
Usage
$ npm install -g @fortellis/fortellis-cli
$ fortellis-cli COMMAND
running command...
$ fortellis-cli (-v|--version|version)
@fortellis/fortellis-cli/0.0.1-alpha.9 darwin-x64 node-v10.17.0
$ fortellis-cli --help [COMMAND]
USAGE
$ fortellis-cli COMMAND
...Commands
fortellis-cli add FILEfortellis-cli api-lint FILEfortellis-cli api-templatefortellis-cli configurefortellis-cli help [COMMAND]fortellis-cli initfortellis-cli pushfortellis-cli status
fortellis-cli add FILE
Add an item to the Fortellis repository.
USAGE
$ fortellis-cli add FILE
ARGUMENTS
FILE Path of file to be pushed.
OPTIONS
-s, --apispec Add API Spec file to the repostory
DESCRIPTION
...
Add a file to the repository.
Currently supported file types:
- API spec files (-s)See code: src/commands/add.js
fortellis-cli api-lint FILE
Lints OpenAPI 2.0 specifications for correctness and style.
USAGE
$ fortellis-cli api-lint FILE
ARGUMENTS
FILE Path of an Open API 2.0 specificaton file
OPTIONS
--display-severity=error|warn|info|hint [default: warn] Show only output greater than the specified severity level
--safe Check that the API spec has been added to the Fortellis repository before
lintingSee code: src/commands/api-lint.js
fortellis-cli api-template
Writes a template Open API 2.0 document to the current directory.
USAGE
$ fortellis-cli api-template
DESCRIPTION
...
Writes a template Open API 2.0 document to the current directory that the user can then modify for API development.See code: src/commands/api-template.js
fortellis-cli configure
Configure Fortellis CLI.
USAGE
$ fortellis-cli configure
OPTIONS
-p, --password=password Fortellis password
-u, --username=username Fortellis username
DESCRIPTION
...
Set up the credentials and other global settings for
the Fortellis CLI in this environment. This will allow it to
communicate with Fortellis Platform.See code: src/commands/configure.js
fortellis-cli help [COMMAND]
display help for fortellis-cli
USAGE
$ fortellis-cli help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLISee code: @oclif/plugin-help
fortellis-cli init
Create a Fortellis repository in the current directory.
USAGE
$ fortellis-cli init
OPTIONS
-f, --force Initialize directory even if it is already a repository.
-i, --orgid=orgid Organizatino ID
-n, --orgname=orgname Organization name
DESCRIPTION
...
A fortellis repository is a directory containing API Specs and a config directory
(/.fortellis) that holds the repo configuration file.See code: src/commands/init.js
fortellis-cli push
Push specified file to fortellis.
USAGE
$ fortellis-cli push
OPTIONS
-f, --file=file
-p, --password=password Fortellis password
-s, --apispec Push API Spec file to Fortellis
-u, --username=username Fortellis username
DESCRIPTION
...
Publish the file (spec, documentation, etc.) to Fortellis: either
an update of an existing file in DRAFT status, or a new version
in FINAL status.
Pass in a username/password to explicitly publish with a given user. Otherwise
the username/password configured in the enviromment (see fortellis-cli configure)
will be used.
A flag must be used to specify the kind of file to be pushed.
-s --apispecSee code: src/commands/push.js
fortellis-cli status
Output the status of the fortellis repository.
USAGE
$ fortellis-cli status
DESCRIPTION
...
List all of the repository files and their status.See code: src/commands/status.js
