Skip to content

Add non-blocking upgrade check on CLI startup#129

Merged
renardeinside merged 2 commits intomainfrom
feat/new-version-checker
Feb 26, 2026
Merged

Add non-blocking upgrade check on CLI startup#129
renardeinside merged 2 commits intomainfrom
feat/new-version-checker

Conversation

@renardeinside
Copy link
Collaborator

Summary

  • Adds check_upgrade_available() in upgrade.rs — fetches the latest GitHub release tag with a 200ms timeout, compares versions, and prints a dim stderr nudge if an update is available
  • Calls the check at the start of run_command() for all subcommands except upgrade (avoids redundant nudge before the upgrade flow)
  • Timeout/network errors are silently logged at debug level so the CLI is never blocked

Closes #128

Test plan

  • cargo build -p apx-cli compiles
  • cargo test -p apx-cli — all 28 tests pass
  • cargo clippy -p apx-cli — zero warnings
  • Manual: apx info shows nudge when a newer version exists
  • Manual: apx upgrade does not show the nudge
  • Manual: disconnected network — command proceeds within ~200ms with no visible error

🤖 Generated with Claude Code

@renardeinside renardeinside merged commit 7be9ab1 into main Feb 26, 2026
3 checks passed
@renardeinside renardeinside deleted the feat/new-version-checker branch February 26, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⬆️ [FEAT] Add upgrade badge

1 participant