feat: add interactive update check on startup

When starting kctl-tui without a subcommand, check GitHub Releases
for a newer version and prompt the user to update.

- Silent skip for dev builds and network errors
- Prompt: 'Update now? [y/N]'
- On 'y': apply update, then start TUI
- On 'N'/Enter: start TUI immediately
This commit is contained in:
2026-08-22 09:33:41 +02:00
parent d743422d28
commit d89efc55d9
3 changed files with 104 additions and 15 deletions
+1 -1
View File
@@ -3,6 +3,7 @@ module github.com/skoelle/kctl-tui
go 1.25.12
require (
github.com/Masterminds/semver/v3 v3.5.0
github.com/charmbracelet/bubbles v0.21.1
github.com/charmbracelet/bubbletea v1.3.10
github.com/creativeprojects/go-selfupdate v1.6.0
@@ -12,7 +13,6 @@ require (
require (
code.gitea.io/sdk/gitea v0.23.2 // indirect
github.com/42wim/httpsig v1.2.4 // indirect
github.com/Masterminds/semver/v3 v3.5.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/colorprofile v0.4.1 // indirect