tools: add Proxmox installation and one-command updates
agent-review agent review: fail

Create unprivileged server or worker LXCs and build native binaries inside the container. Refresh a clean published checkout before updates, preserve configuration and history, and roll back failed binary activation without resetting local source work.

Refs #19
This commit is contained in:
Florian Schmidt
2026-11-15 10:59:41 +01:00
parent ab3dcf64e8
commit b23b7289c7
13 changed files with 1644 additions and 15 deletions
+17 -4
View File
@@ -1,8 +1,8 @@
# FinalToken
A small tray app that tracks Claude Code and Codex usage and limits on Windows 11 and CachyOS. It
never signs in to a provider and never handles a token: all data comes from the installed CLIs
and the files they write. A stats panel shows history, small popups warn when usage runs ahead
keeps provider credentials owned by the installed CLIs. The optional web dashboard coordinates
official CLI login with transient authorization-code relay (D14). A stats panel shows history, small popups warn when usage runs ahead
of or behind a limit's pace, and a Stream Deck plugin puts stats on keys. Developer:
schmidt.florian (Gitea user name).
@@ -30,6 +30,9 @@ the decision, why and gives-up format, and carries the `type/decision` label.
| `src/FinalToken.App` | Avalonia desktop app (D8): stats panel, tray, settings, popups |
| `src/FinalToken.Cli` | `finaltoken-cli` console: runs a refresh and prints the snapshot, for scripts and checks |
| `src/FinalToken.StreamDeck` | Stream Deck plugin executable and its `.sdPlugin` assets (D10) |
| `src/FinalToken.Fleet` | Account/machine metadata, shared analysis and pending official CLI logins (D14) |
| `src/FinalToken.Web` | Authenticated self-hosted dashboard and outbound-worker API (D14) |
| `src/FinalToken.Worker` | Per-OS-user collector and official CLI login process host (D14) |
| `tests/*` | One test project per tested project, named `<Project>.Tests` |
| `tools/` | Repository tools, listed under [Tools](#tools) |
@@ -41,8 +44,10 @@ the decision, why and gives-up format, and carries the `type/decision` label.
no reflection-driven serialization, binding or loading, no `dynamic`, no runtime code
generation. Trim and AOT analyzer warnings are errors; never suppress one without a one-line
reason at that spot.
- Never touch credentials (D2): do not open credential files, environment secrets or keychains,
never log message text, and never call a provider's HTTP API.
- Never touch provider credentials (D2): do not open credential files, provider environment secrets or keychains,
never log message text, and never call a provider's HTTP API. D14 permits authenticated,
transient authorization-response relay to the pending official CLI login. Dashboard/worker
access keys authenticate FinalToken transport; they are not provider credentials.
- Child processes (`claude`, `codex`) run without a shell, with arguments as a list, a timeout and
cancellation, and are killed with their process tree when they overrun (D6).
- Every file the app writes for itself is written atomically (D5).
@@ -130,6 +135,14 @@ a screenshot of each changed view: compiling is not working.
- `tools/publish.py`: publishes the app, `finaltoken-cli` and Stream Deck plugin with NativeAOT
into an empty output directory and creates a ZIP beside it. Run on the target OS. It stamps
the plugin manifest's `Version` from `<Version>`; its test is `python -B tools/test_publish.py`.
- `tools/test_web_dashboard.py`: provider-free HTTP/worker/process integration; build Release first.
`--serve-fixture` runs a temporary synthetic dashboard for screenshots. See `docs/web-dashboard.md`.
- `tools/proxmox.sh`: creates/updates a managed Debian 13 LXC from the Proxmox host. Its Python
helpers live in `tools/proxmox/`; test with `python -B tools/proxmox/test_installer.py`. See `docs/proxmox.md`.
- `tools/proxmox-update.sh CTID`: fast-forwards a clean tracking checkout, then runs the fetched
installer against a managed CT; test with `python -B tools/proxmox/test_update.py`.
- `tools/check_public.py --history`: read-only publication pattern check. It reports paths/pattern
names, never matching values; tests are `python -B tools/test_check_public.py`. See `docs/publication.md`.
## Writing