Files
cv4pve-cli-tui/README.md
T
DuckbootandClaude Opus 5.5 62b79ab29e Add context listing and switching to the TUI
Press c to list cv4pve-cli contexts and switch between them. The
active context is always shown in the header.

- Switching runs `cv4pve-cli config use`, which changes the global
  current context. cv4pve-cli 2.4.0 has no per-call context option.
- `config list` has no JSON output, so its text lines are parsed.
- The guest table is cleared as soon as another context is chosen, so
  the old cluster's guests cannot be acted on.
- A generation counter drops guest listings that started before a
  switch, and g and c are refused while a switch runs. Without this,
  a reload already in flight could refill the table with the old
  cluster's guests, and VMIDs collide across clusters.

103 tests pass. The switch was tested live from mainframe to
mainframe-edge and back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 20:22:53 +01:00

1.1 KiB

cv4pve-cli-tui

Textual TUI for cv4pve-cli: list Proxmox VE guests (VMs and LXC), start/shutdown/stop/reboot them, and change cores, memory and disk size.

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

uv run cv4pve-tui
Key Action
s start
S shutdown (confirm)
x stop - hard power-off (confirm)
r reboot (confirm)
e edit cores / memory / grow a disk (disk growth asks again; it cannot be undone)
g refresh
c switch cv4pve-cli context (cluster)
q quit

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.

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

uv sync
uv run pytest

Tests mock cv4pve-cli; they never touch a cluster. Design: docs/plans/guest-tui-mvp.md.