U opens "Package updates": the pending apt updates of every online node, with node, package, current and new version, origin and priority. A node that fails is shown as "<node>: unavailable", and the other nodes are still listed. A hint says the list is as of the node's last apt update; this call does not refresh it. The main frame's bottom border shows "· N package updates" after the backup count, with a singular for 1. The count is fetched on mount, after a context switch and whenever the updates screen loads, not on every guest reload, since it costs one CLI call per node. It uses the same generation guard as the guest list, so a count from the old cluster is dropped after a switch. Running apt update or upgrade stays out of scope; it is a write. Read-only live check: "mainframe · 23 package updates", and 23 rows in the screen. Closes #13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
3.3 KiB
Markdown
61 lines
3.3 KiB
Markdown
# cv4pve-cli-tui
|
|
|
|
[](https://git.duckboot.net/Duckboot/cv4pve-cli-tui/actions)
|
|
|
|
Textual TUI for [cv4pve-cli](https://github.com/Corsinvest/cv4pve-cli): list Proxmox VE
|
|
guests (VMs and LXC), start/shutdown/stop/reboot them, and change cores, memory and
|
|
disk size. The table shows CPU % and Mem % of running guests and the info screen shows
|
|
in-use values (refresh with `g`).
|
|
|
|
It shells out to `cv4pve-cli` and uses its current context (`cv4pve-cli config use <name>`);
|
|
it stores no credentials itself. Tested with cv4pve-cli 2.4.0.
|
|
|
|
## Run
|
|
|
|
```sh
|
|
uv run cv4pve-tui
|
|
```
|
|
|
|
| Key | Action |
|
|
|-----|--------|
|
|
| `s` | start |
|
|
| `S` | shutdown (confirm) |
|
|
| `x` | stop - hard power-off (confirm) |
|
|
| `r` | reboot (confirm) |
|
|
| `Enter` | info: resources (CPU, memory, swap, disks), backups, backup job, network (config and runtime IPs) |
|
|
| `Enter` then `e` | in info: edit cores / memory / grow a disk (disk growth asks again; it cannot be undone) |
|
|
| `Enter` then `b` | in info: backup now (snapshot, zstd, storage choice); `a` there = also show backups of earlier guests that had the same VMID |
|
|
| `Enter` then `n` | in info: edit network (bridge, VLAN, firewall, IPv4/IPv6; VM IP via cloud-init at next boot); `u` there = undo the last network change of this guest (this session only) |
|
|
| `Enter` then `p` / `R` / `D` | in info: take a snapshot (name, description, VM: include RAM) / roll back to the snapshot under the cursor (confirms; starts the guest again if it is running) / delete the snapshot under the cursor (confirms) |
|
|
| `t` | shell in a running LXC container (`ssh -t root@<node> pct enter <vmid>`) |
|
|
| `l` | tasks: recent cluster tasks (start, duration, node, type, VMID, user, status; `!` marks failures); `Enter` shows the log of the task under the cursor, `g` reloads. In info: `l` = only this guest's tasks |
|
|
| `U` | package updates: pending updates per online node (node, package, current, new, origin, priority), read-only; `g` reloads. The list is as of the node's last `apt update`. The frame's bottom border shows the count |
|
|
| `g` | refresh |
|
|
| `c` | switch cv4pve-cli context (cluster) |
|
|
| `q` | quit |
|
|
|
|
Warning: link changes (bridge, VLAN, firewall) apply immediately on a running guest and can cut its network (and DNS for others if the guest is your DNS server). IP changes on a running container may need a reboot of the container (seen: static -> DHCP gave no IPv4 until a reboot).
|
|
|
|
The shell key needs key-based root SSH to the PVE node (LXC only).
|
|
|
|
Switching context runs `cv4pve-cli config use`, which changes cv4pve-cli's global current
|
|
context: other shells and scripts follow, and it stays after the app exits.
|
|
|
|
A `!` in the first column marks a guest that no backup job covers (Proxmox's
|
|
`not-backed-up` list); the frame's bottom border shows how many.
|
|
|
|
Empty fields in the edit dialog are left unchanged. If a CPU/memory change cannot be
|
|
hot-plugged, the app tells you it applies at the next reboot.
|
|
|
|
## Development
|
|
|
|
```sh
|
|
uv sync
|
|
uv run pytest
|
|
uv run ruff check src tests && uv run ruff format --check src tests
|
|
```
|
|
|
|
Tests mock `cv4pve-cli`; they never touch a cluster. CI (`.gitea/workflows/ci.yaml`) runs
|
|
the same commands on every PR into `main`; ruff is pinned in the dev group so local runs
|
|
and CI check the same rules. Design: `docs/plans/guest-tui-mvp.md`.
|