Skip to content

Add version deprecation warning to CLI commands#522

Merged
bborn merged 2 commits intomainfrom
task/2023-add-version-deprecation-warning-to-cli
Mar 22, 2026
Merged

Add version deprecation warning to CLI commands#522
bborn merged 2 commits intomainfrom
task/2023-add-version-deprecation-warning-to-cli

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Mar 22, 2026

Summary

  • CLI subcommands now show a yellow warning on stderr when a newer version of TaskYou is available (e.g. Update available: v0.1.0 → v0.2.0 (run: ty upgrade))
  • Uses a 24h on-disk cache (~/.local/share/task/version-check.json) to avoid hitting the GitHub API on every CLI invocation
  • Skips the check for dev builds, the TUI root command (has its own check), upgrade, daemon, mcp-server, and claude-hook

Test plan

  • All existing tests pass (go test ./internal/github/)
  • New tests cover: dev version skip, cached newer version detection, cached same version (no warning), and cache read/write roundtrip
  • Manual: run ty list with an old version → verify warning appears on stderr
  • Manual: run ty list again immediately → verify cache is used (no API call delay)

🤖 Generated with Claude Code

bborn and others added 2 commits March 22, 2026 07:34
CLI subcommands now check for newer versions and print a warning to
stderr when an update is available. Uses a 24h on-disk cache to avoid
hitting the GitHub API on every invocation. The TUI, upgrade, daemon,
mcp-server, and claude-hook commands are excluded since they either
have their own check or run non-interactively.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bborn bborn merged commit 2b999ca into main Mar 22, 2026
3 of 4 checks passed
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.

1 participant