Summary
There is no self-update, upgrade, or update subcommand. Users on a tracked release branch must manually re-run install.sh (or copy the release binary by hand) to upgrade. Tools like rustup update, gh extension upgrade, gcloud components update set the expectation that a CLI manages its own version; the lack of one here means many users sit on the version they first installed, and Slack/issues are full of "is this fixed in main?" because no one tracks releases.
Where
src/CodeIndex/Cli/ConsoleUi.cs:539-544 (Commands array)
src/CodeIndex/Cli/ProgramRunner.cs:67-93 (subcommand router)
Suggested approach
(1) Add cdidx upgrade [--check-only] [--prerelease] [--channel stable|beta]. (2) On invocation: query GitHub releases API, download the asset for the host platform/arch, verify checksum (paired with release.yml provenance), atomically swap into the install dir. (3) --check-only reports newer-version availability without installing. (4) Refuse to upgrade if the binary is in a path the current user can't write to (suggest sudo or a per-user reinstall). (5) Coordinate with #1550 (--version metadata) so the upgrade source-of-truth is unambiguous. (6) Document failure modes (network, checksum mismatch, locked file on Windows). (7) Cover with an integration test that mocks the GitHub API and asserts the upgrade-then-version flow works.
Summary
There is no
self-update,upgrade, orupdatesubcommand. Users on a tracked release branch must manually re-runinstall.sh(or copy the release binary by hand) to upgrade. Tools likerustup update,gh extension upgrade,gcloud components updateset the expectation that a CLI manages its own version; the lack of one here means many users sit on the version they first installed, and Slack/issues are full of "is this fixed in main?" because no one tracks releases.Where
src/CodeIndex/Cli/ConsoleUi.cs:539-544(Commands array)src/CodeIndex/Cli/ProgramRunner.cs:67-93(subcommand router)Suggested approach
(1) Add
cdidx upgrade [--check-only] [--prerelease] [--channel stable|beta]. (2) On invocation: query GitHub releases API, download the asset for the host platform/arch, verify checksum (paired with release.yml provenance), atomically swap into the install dir. (3)--check-onlyreports newer-version availability without installing. (4) Refuse to upgrade if the binary is in a path the current user can't write to (suggestsudoor a per-user reinstall). (5) Coordinate with #1550 (--version metadata) so the upgrade source-of-truth is unambiguous. (6) Document failure modes (network, checksum mismatch, locked file on Windows). (7) Cover with an integration test that mocks the GitHub API and asserts the upgrade-then-version flow works.