Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@useoptic/cli

8.3.8 • Public • Published

local-cli

CLI to document your API and generate artifacts

oclif Version Downloads/week License

Usage

$ npm install -g @useoptic/cli
$ api COMMAND
running command...
$ api (-v|--version|version)
@useoptic/cli/8.3.8 linux-x64 node-v12.18.3
$ api --help [COMMAND]
USAGE
  $ api COMMAND
...

Commands

api check [TASKNAME]

Validate the correctness of a task in your optic.yml

USAGE
  $ api check [TASKNAME]

See code: src/commands/check.ts

api generate:oas

export an OpenAPI 3.0.1 spec

USAGE
  $ api generate:oas

OPTIONS
  --json
  --yaml

See code: src/commands/generate/oas.ts

api help [COMMAND]

display help for api

USAGE
  $ api help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

api init

Add Optic to your API

USAGE
  $ api init

OPTIONS
  --command=command
  --inboundUrl=inboundUrl
  --targetUrl=targetUrl

See code: src/commands/init.ts

api login

Login to Optic from the CLI

USAGE
  $ api login

See code: src/commands/login.ts

api logout

Logout from Optic

USAGE
  $ api logout

See code: src/commands/logout.ts

api run [TASKNAME]

Run a task from your optic.yml

USAGE
  $ api run [TASKNAME]

See code: src/commands/run.ts

api scripts [SCRIPTNAME]

Run one of the scripts in your optic.yml file

USAGE
  $ api scripts [SCRIPTNAME]

OPTIONS
  -i, --install

See code: src/commands/scripts.ts

api spec

Open your Optic API specification

USAGE
  $ api spec

See code: src/commands/spec.ts

api start

starts your API process behind an Optic proxy

USAGE
  $ api start

See code: src/commands/start.ts

Keywords

Install

npm i @useoptic/cli

DownloadsWeekly Downloads

340

Version

8.3.8

License

MIT

Unpacked Size

92.9 kB

Total Files

56

Last publish

Collaborators

  • avatar
  • avatar
  • avatar