Metadata-Version: 2.4
Name: rhythmos-cli
Version: 0.1.0
Summary: A lightweight CLI framework with project-local auto-discovered commands
Project-URL: Homepage, https://gitlab.com/JoanMbela/rhythmos-cli
Project-URL: Repository, https://gitlab.com/JoanMbela/rhythmos-cli
Author-email: mbela imm <mbela.immongault@globalnext.rocks>
License-Expression: MIT
License-File: LICENCE
Keywords: argparse,cli,commands
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Rhythmos CLI

A lightweight CLI framework. Install once, put commands in each project's `commands/` folder.

## Install

```bash
pip install rhythmos-cli
```

## Usage

In any project:

```bash
rhythmos-cli make hello -d "Say hello to someone"
# edit commands/hello.py
rhythmos-cli hello Alice
```

`rhythmos` is an optional shorthand for the same CLI.

`make` and `list` are built-in system commands. If you define a user command with the same name, yours wins and a warning is printed.

Commands are loaded from `./commands` (cwd), or from `RHYTHMOS_COMMANDS` if set.

## Write a command

```python
from rhythmos import BaseCommand


class HelloCommand(BaseCommand):
    def get_description(self):
        return "Say hello to someone"

    def add_arguments(self):
        self.parser.add_argument("name", help="Name of the person to greet")

    def handle(self, name):
        print(f"Hello, {name}!")
```

File `commands/foo_bar.py` → `rhythmos-cli foo-bar`.

See `examples/commands/hello.py` for a ready example.

## Develop this package

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .
RHYTHMOS_COMMANDS=examples/commands rhythmos-cli hello World
```
