Metadata-Version: 2.4
Name: cliron
Version: 0.2.1
Summary: Everything you need to build your own CLI.
Keywords: cli,command-line,framework
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Typing :: Typed
Requires-Python: >=3.11
Project-URL: Repository, https://github.com/marcusfrdk/cliron
Project-URL: Issues, https://github.com/marcusfrdk/cliron/issues
Project-URL: Changelog, https://github.com/marcusfrdk/cliron/blob/main/CHANGELOG.md
Description-Content-Type: text/markdown

# Cliron

[![PyPI](https://img.shields.io/pypi/v/cliron)](https://pypi.org/project/cliron/)
[![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fmarcusfrdk%2Fcliron%2Fmain%2Fpyproject.toml)](https://pypi.org/project/cliron/)
[![CI](https://github.com/marcusfrdk/cliron/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/marcusfrdk/cliron/actions/workflows/ci.yml)
[![License](https://img.shields.io/github/license/marcusfrdk/cliron)](https://github.com/marcusfrdk/cliron/blob/main/LICENSE)

Everything you need to build your own CLI, giving you the features you'd expect out of the box, and lets you change any of them to fit your tool. All dependency free.

## Installation

```bash
pip install cliron
```

## Requirements

- **Python**: 3.11 or higher

## Quick start

```python
from cliron import argument, command, group, option


@group("notes")
def notes() -> None:
    """Keep notes."""


@command("add")
@argument("text")
@option("tag", "-t")
def add(text: str, tag: str = "inbox") -> str:
    """Add a note."""
    return f"Added {text!r} to {tag}."


notes.add(add)

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

```console
$ python notes.py add milk -t shopping
Added 'milk' to shopping.
$ python notes.py ad milk
error: 'ad' isn't a notes command. Did you mean 'add'?
Run 'notes --help' for usage.
```

The [guide](https://github.com/marcusfrdk/cliron/blob/main/GUIDE.md) shows how to use cliron, and the [reference](https://github.com/marcusfrdk/cliron/blob/main/REFERENCE.md) describes every public function and class.

## Development

Install the virtual environment and development dependencies in order to start developing.

```bash
just sync
```

See [CONTRIBUTING.md](https://github.com/marcusfrdk/cliron/blob/main/CONTRIBUTING.md) to contribute.

## License

This project is licensed under the MIT license. See the [LICENSE](https://github.com/marcusfrdk/cliron/blob/main/LICENSE) file for more information.
