25 lines
1019 B
Markdown
25 lines
1019 B
Markdown
# Crystal CLI Generator
|
|
|
|
## TOC
|
|
- [Overview](#Overview)
|
|
- [Topics](#Topics)
|
|
|
|
## Overview
|
|
|
|
Put simply, this is a framework that seeks to "objectize" your CLI commands so that you can draw the shape of your commands & command tree in crystal and let the framework make that into an associated command structure.
|
|
|
|
```
|
|
App ->
|
|
cmd1 ->
|
|
subcmmd1
|
|
|
|
cmd2 ->
|
|
subcmmd2
|
|
```
|
|
|
|
At a high level the framework (using the class semmantics and macros of crystal) can discover your commands and each's "flags"/arguments via annotations with metadata on what you need to be done for each (static option list, verfiication proc, on_match trigger proc, etc). It's all of this data that allows the framework to serialize them all into a command tree alongside typed flags that allow for us to parse commandline arguments and initialize your command class so that you can pass it around as a data/config object or do actions directly with it.
|
|
|
|
## Topics
|
|
- [Codebase Docs](./Codebase/README.md)
|
|
- [Examples](./Examples/README.md)
|