Metadata-Version: 2.4
Name: EasyCliMenu
Version: 0.1.0
Summary: Simple CLI menu library for Python
Author: Bowser-2077
Author-email: hostinfire@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# cli-menu

Complete interactive CLI menu without external dependencies.

---

## Description

`cli-menu` is a Python library to easily create interactive command-line menus, compatible with Windows, Linux, and macOS, with **no external dependencies**.

Features:  
- Keyboard navigation (arrow keys up/down, left/right for paging)  
- Single or multiple selection mode (space bar to check/uncheck)  
- Quit with `q` or `ESC`  
- Colored display using ANSI codes  
- Customizable titles and descriptions  
- Automatic pagination  
- Callbacks for specific options  
- Windows and Unix compatible (handles console specifics)

---

## Installation

```bash
pip install cli-menu
```
## Basic Usage

```python
from cli_menu import CliMenu

menu = CliMenu(
    options=["Option 1", "Option 2", "Quit"],
    title="=== MAIN MENU ===",
    description="Use arrow keys and Enter to navigate.",
    multiselect=False
)

choice = menu.show()
print(f"You selected: {menu.options[choice]}")
```
## Main Parameters

| Parameter   | Type             | Description                              | Default          |
| ----------- | ---------------- | ---------------------------------------- | ---------------- |
| options     | list\[str]       | List of options displayed in the menu    | *Required*       |
| title       | str              | Title displayed above the menu           | `None`           |
| description | str              | Description displayed below the title    | `None`           |
| multiselect | bool             | Enable multiple selection with space bar | `False`          |
| page\_size  | int              | Max number of options displayed per page | `10`             |
| color       | bool             | Enable ANSI color output                 | `True`           |
| exit\_keys  | list\[str]       | Keys to exit menu (e.g., `q`, `ESC`)     | `['q', '\\x1b']` |
| callbacks   | dict\[int, func] | Functions triggered on option selection  | `{}`             |

## Methods

```python
 show()
```
Displays the menu and handles keyboard interaction.
Returns:

   - Selected index (int) in single-select mode

   - List of selected indices (list[int]) in multi-select mode

   - None if user exits with an exit key

### Author

Gaetan Lerley -- Hostinfire@gmail.com




