Add OpenCLI integration to Spectre.Console.Cli

This commit is contained in:
Patrik Svensson
2025-09-30 08:59:13 +02:00
committed by Patrik Svensson
parent 3a70fbec75
commit b551bbd244
20 changed files with 549 additions and 27 deletions

22
docs/input/cli/opencli.md Normal file
View File

@@ -0,0 +1,22 @@
Title: OpenCLI Integration
Order: 15
Description: OpenCLI integration
Highlights:
- Generate OpenCLI descriptions
---
From version `0.52.0` and above, you will be able to generate [OpenCLI](https://opencli.org)
descriptions from your `Spectre.Console.Cli` applications.
Simply add the `--help-dump-opencli` option to your application, and an
OpenCLI description will be written to stdout.
```shell
$ ./myapp --help-dump-opencli
```
If you want to save it to disk, pipe it to a file.
```shell
$ ./myapp --help-dump-opencli > myapp.openapi.json
```