An open API service indexing awesome lists of open source software.

https://github.com/axemanofic/clite

Small package for creating command line interfaces
https://github.com/axemanofic/clite

cli click python python3 shell terminal typehints typer typing

Last synced: 2 days ago
JSON representation

Small package for creating command line interfaces

Awesome Lists containing this project

README

          


Clite

A zero-dependency package for building CLIs. Based on type hints.


The name is inspired by the SQLite


PyPI - Version
PyPI - Downloads
PyPI - Python Version

---

**Documentation**: https://axemanofic.github.io/clite

**Source Code**: https://github.com/axemanofic/clite

---

## Installation

```sh
pip install clite
```

## Usage

### Example

```python
from clite import Clite

app = Clite(
name="myapp",
description="A small package for creating command line interfaces",
)

@app.command()
def hello(name: str = "world"):
print(f"Hello, {name}!")

if __name__ == "__main__":
app()
```

### Run it

```sh
python main.py hello Alice
```

Output:

```
Hello, Alice!
```

## License

This project is licensed under the terms of the MIT license.