Skip to content

feat(update): add verified self-update command - #1768

Closed
othavi0 wants to merge 1 commit into
rtk-ai:developfrom
othavi0:feat/update-command
Closed

othavi0 wants to merge 1 commit into
rtk-ai:developfrom
othavi0:feat/update-command

Conversation

@othavi0

@othavi0 othavi0 commented May 7, 2026

Copy link
Copy Markdown

Summary

Adds rtk update.

For direct binary installs, RTK now updates itself from GitHub Releases:

  • rtk update installs the latest release
  • rtk update --check checks without changing anything
  • rtk update --tag v0.39.0 installs a specific tag
  • rtk update --force reinstalls even when versions match
  • rtk update --yes skips the confirmation prompt

The updater verifies checksums.txt, rejects unsafe archive entries, and replaces the current binary through a temp file in the same directory.

Managed installs stay managed. If RTK detects Homebrew, Cargo, or a source-tree binary, it prints the right upgrade command instead of overwriting files it should not own.

Why

Users keep asking for this. See #1763 and #995.

Today the answer is basically "reinstall it yourself". That works, but it is not much of an answer after you have shipped a CLI people use every day.

This keeps the boring path boring:

rtk update

No shell installer pipeline. No guessing which file to replace. No writing over Homebrew or Cargo installs.

Related Work

Related to #614.

That PR adds an update command too. Main difference: this implementation keeps direct binary updates inside Rust and verifies the release artifact before replacing the executable.

Homebrew and Cargo remain package-manager paths here. I think that boundary matters. I have debugged enough broken self-updaters to prefer boring ownership rules.

Docs

Updated:

  • README.md
  • INSTALL.md

CHANGELOG.md is not edited manually because release-please owns it.

Testing

cargo fmt --all --check
cargo clippy --all-targets
cargo test

cargo clippy --all-targets exits successfully. It still reports existing warnings outside this change.

@CLAassistant

CLAassistant commented May 7, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This was referenced May 27, 2026
@lfarkas

lfarkas commented Jun 18, 2026

Copy link
Copy Markdown

any chance to merge it?

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@rtk-release-bot

Copy link
Copy Markdown
Contributor

Closing this pull request after a prolonged period of inactivity. If this is still relevant, please ask for it to be reopened. Thank you!

@rtk-release-bot rtk-release-bot Bot closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants