Metadata-Version: 2.4
Name: nmcli-tui
Version: 1.0.0
Summary: A clean ncurses TUI wrapper for nmcli — manage NetworkManager from the terminal with rounded corners and style.
Author: nmcli-tui contributors
License: MIT
Project-URL: Homepage, https://github.com/samsit-phew/nmcli-tui
Project-URL: Repository, https://github.com/samsit-phew/nmcli-tui
Project-URL: Issues, https://github.com/samsit-phew/nmcli-tui/issues
Keywords: nmcli,networkmanager,tui,ncurses,curses,wifi,network,terminal
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console :: Curses
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
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: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Dynamic: license-file

# nmcli-tui

> A clean **ncurses** TUI wrapper for **`nmcli`** — manage NetworkManager from
> the terminal with rounded corners and style.

`nmcli-tui` wraps every major `nmcli` capability behind a tasteful, keyboard-
driven terminal interface built on the standard-library `curses` module. No
bloat, no Electron, no dependencies — just Python and NetworkManager.

> 🌸 **A tribute to samsit-phew.** Every `╭ ╮ ╰ ╯` on this screen is a small
> thank-you to a sensibility that believed terminal tools deserve rounded
> corners, soft accents and respect for the operator's eyes. Open the in-app
> help (`?`) to read it.

---

## Features

- **Seven tabs** covering the whole `nmcli` surface:
  | Tab | Covers |
  |-----|--------|
  | General | `nmcli general` — status, hostname, permissions |
  | Devices | `nmcli device` — status, connect, disconnect, reapply, delete |
  | WiFi | `nmcli device wifi` — scan, list, connect (with password), hidden networks |
  | Connections | `nmcli connection` — show, up, down, edit, delete, clone, add, reload |
  | Networking | `nmcli networking` — on / off / connectivity check |
  | Radio | `nmcli radio` — Wi-Fi & WWAN toggles |
  | Help | keybindings + the samsit-phew tribute |

- **Rounded-corner panels** drawn with Unicode box-drawing characters
- **Tables** with columnar alignment, scrolling and a selection cursor
- **Modal dialogs** — messages, confirmations, forms and an action menu
- **Password masking** for Wi-Fi PSKs
- **Resizes** with your terminal (`KEY_RESIZE` aware)
- **Zero runtime dependencies** — pure standard library

## Installation

### From PyPI

```bash
pip install nmcli-tui
```

### From source

```bash
git clone https://github.com/samsit-phew/nmcli-tui.git
cd nmcli-tui
pip install .
```

Then launch with:

```bash
nmcli-tui            # or the alias:  nmtui2
nmcli-tui --sudo     # if you have passwordless sudo
```

> Most write operations (connect, modify, delete, …) require root. Run inside
> `sudo` or pass `--sudo` if your `sudo` is configured for non-interactive
> use.

## Keys

| Key | Action |
|-----|--------|
| `Tab` / `→` | Next tab |
| `Shift+Tab` / `←` | Previous tab |
| `1`–`7` | Jump to a tab |
| `↑` `↓` or `k` `j` | Move selection |
| `Enter` | Activate item / open the action menu |
| `Esc` / `q` | Close dialog / quit |
| `r` / `F5` | Refresh current tab |
| `?` | Help (read the tribute!) |

Tab-specific hotkeys are listed in the in-app help screen.

## Why a TUI when `nmtui` already exists?

The bundled `nmtui` works but looks like 2010. `nmcli-tui` is a love letter to
the terminal: rounded corners, a cohesive colour palette, a tabbed layout and
inline forms — while still shelling out to the real `nmcli` so behaviour stays
100% compatible.

## Packaging layout

```
nmcli-tui/
├── pyproject.toml          # PEP 517/518 build config + entry points
├── README.md
├── LICENSE
└── src/nmcli_tui/
    ├── __init__.py
    ├── __main__.py          # `python -m nmcli_tui`
    ├── cli.py               # argparse entry point
    ├── py.typed             # PEP 561 marker
    ├── core/
    │   └── nmcli.py         # the full nmcli wrapper
    └── tui/
        ├── theme.py         # colours + box-drawing constants
        ├── widgets.py       # Panel, Table, Form, TextInput, dialogs
        ├── screens.py       # the seven tab screens
        ├── help.py          # help + tribute
        └── app.py           # the main loop
```

## Development

```bash
pip install -e ".[dev]"
python -m nmcli_tui
```

Build a distribution:

```bash
python -m build
twine upload dist/*
```

## License

MIT — see [LICENSE](LICENSE).

---

<p align="center">
  <em>Made with rounded corners.</em><br>
  <em>A tribute to samsit-phew.</em>
</p>
