Metadata-Version: 2.1
Name: cli-lite
Version: 0.5.1
Summary: A simple framework to build a cli tool, base on Alconna
License: MIT
Keywords: commandline,cli-tool,plugin,cli,litecli
Author-email: RF-Tar-Railt <rf_tar_railt@qq.com>
Requires-Python: >=3.8
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Bug Reports, https://github.com/RF-Tar-Railt/cli-lite/issues
Project-URL: Homepage, https://github.com/RF-Tar-Railt/cli-lite
Project-URL: Source, https://github.com/RF-Tar-Railt/cli-lite
Description-Content-Type: text/markdown

# Cli-Lite

A simple framework to build a cli tool. Base on [`Alconna`](https://github/ArcletProject/Alconna)

## install

```powershell
pip install cli-lite
```

## example

write as sample:

```python
from clilte import BaseCommand, CommandLine, CommandMetadata
from arclet.alconna import Alconna, Arparma, Args


class MyCommand(BaseCommand):

    def init(self) -> Alconna:
        return Alconna("hello", Args["name", str])

    def dispatch(self, result: Arparma):
        return print(f"Hello! {result.name}")

    def meta(self) -> CommandMetadata:
        return CommandMetadata("hello", "0.0.1", "my first plugin", ["dev"], ["john"])


if __name__ == '__main__':
    cli = CommandLine(
        "test",
        "My first CLI",
        "0.0.1"
    )
    cli.add(MyCommand)
    cli.main()
```

and execute the line:

```powershell
python test.py hello world
```


