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
- Unmarshal and validate validate OpenCLI Spec files
- Generate CLI boilerplate code for common CLI frameworks
- Generate CLI documentation in various formats
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 🤯
- OpenAPI Specification
- Code generation tools like:
- Stripe's amazing looking CLI documentation