{{ message }}
feat(cli): add chm upgrade alias and explicit update fallbacks - #3147
Merged
Conversation
Co-Authored-By: duyetbot <bot@duyet.net> Co-authored-by: duyet <duyet@users.noreply.github.com>
Contributor
This was referenced Aug 19, 2026
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #3145.
chm upgradeis a first-class alias ofchm update(same--check/--versionflags, samecli_run/updatetelemetry). Self-update now prints current -> target version, and checksum / permission / unsupported-target failures are explicit with a copy-pasteable fallback (scripts/install.shorcargo install ch-monitor-cli --force). The command never invokes sudo.Summary
Users say
upgradeas often asupdate. The CLI, installer, and docs now treat them as one product without breakingchm update.Changes
chm upgradeandchm updateshareUpdateArgs(--check,--version) inrust/ch-monitor-cli/src/main.rssrc/update.rs: printchm vX -> tagbefore work; checksum / permission / unsupported-target errors include install.sh or cargo fallback; never asudocommandscripts/install.sh: missing/empty checksum is fatal (no silent unverified install); unwritable dir suggestsCHM_INSTALL_DIR/ cargo instead of a doomed temp-pathsudo cp; mentionschm upgraderust/ch-monitor-cli/README.md,docs/content/guide/guides/diagnostics-cli.mdx,docs/knowledge/standalone-cli.mdrust/Cargo.lockpackage version aligned to crate0.1.1(no version bump)Left alone
chm updatekept as-is for existing scripts("cli_run", "update")for both commands;CHM_LICENSE_KEYhonor-system ping unchangedchm-v*release PRs not touchedTest plan
cargo test --lockedinrust/ch-monitor-cli— 39 passed (version parse, newest-tag pick, alias wiring, fallback copy-paste)cargo clippy --locked -- -D warningscleancargo fmt --all -- --checkcleanchm --helplists bothupdateandupgrade;chm upgrade --helpexposes--checkand--versionbash -n scripts/install.shpnpm run lint— not applicable (Rust CLI / docs / install script only)pnpm run build— not applicablepnpm run type-check:test— not applicablepnpm run test:unit— not applicabledocs/content/docs/content/ai-agent.mdx— not applicable (no agent tools/skills/env vars)Notes for reviewer
Unsupported-target errors point at
cargo install(source build) rather thaninstall.sh, which would also refuse that platform.Co-Authored-By: duyetbot bot@duyet.net