Skip to content
/ opencli Public

The OpenCLI Specification and Tooling Repository

License

Notifications You must be signed in to change notification settings

bcdxn/opencli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCLI Specification

Go Reference ocli-badge

Define your CLI in a declarative, language-agnostic document that can be used to generate documentation and boilerplate code.

Like OpenAPI Spec, but for your CLIs

Capabilities

  • Unmarshal and validate validate OpenCLI Spec files
  • Generate CLI boilerplate code for common CLI frameworks
  • Generate CLI documentation in various formats

Example

opencliVersion: 1.0.0-alpha.0

info:
  title: Greet
  summary: A fun CLI defined by OpenCLI Spec
  version: 1.0.0
  binary: greet
      
commands:
  greet {command} <arguments> [flags]:
    group: true
  greet me <name> [flags]:
    summary: "Say hello"
    arguments:
      - name: "name"
        summary: "Your name"
        required: false
        type: "string"
    flags:
      - name: "language"
        summary: "The language of the greeting"
        required: false
        type: "string"
        choices:
          - value: "english"
          - value: "french"
          - value: "german"

See a full example of an OpenCLI Document here - the document that defines the OpenCLI CLI 🤯

Inspiration

Releases

No releases published

Packages

No packages published

Languages