Metadata-Version: 2.4
Name: c2e
Version: 1.dev5
Summary: C2E: Console Command Engine
Author: iFamished
License: GPL-3.0
Project-URL: Homepage, https://github.com/iFamished/C2E
Project-URL: Documentation, https://github.com/iFamished/C2E
Project-URL: Source, https://github.com/iFamished/C2E
Project-URL: Issues, https://github.com/iFamished/C2E/issues
Keywords: command,console,cli,cli-tool,utility,hungerlib,hungernet
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mapres
Dynamic: license-file

# C2E — Console Command Engine

C2E is a lightweight, async‑friendly console command framework for Python.  
It provides a raw‑mode terminal engine (`LiveCLI`) and a flexible command DSL for building interactive CLIs with subcommands, parameters, flags, and argument metadata.

C2E is extracted from the ServerWatcher CLI and generalized into a reusable standalone library.

---

## Features

- **Async console loop**  
  Uses `asyncio.to_thread` to keep the event loop responsive.

- **Raw terminal input**  
  Reads characters directly using `termios` and `tty.setraw`.

- **Command DSL**  
  Decorators for commands, children, parameters, flags, and argument metadata.

- **Automatic help generation**  
  Built‑in help for commands, subcommands, and argument‑level usage.

- **Dynamic parameter/flag injection**  
  Child functions receive parameter values and flag states via wrapped globals.

- **View‑safe printing**  
  `safePrint()` integrates with external buffer systems without breaking terminal output.

- **Minimal dependencies**  
  Only Python standard library + optional MapRes for color formatting.

---

## Installation

```bash
pip install c2e
```
