feat(cli): add chm upgrade alias and explicit update fallbacks by duyet · Pull Request #3147 · chmonitor/chmonitor · GitHub
Skip to content

feat(cli): add chm upgrade alias and explicit update fallbacks - #3147

Merged
duyetbot merged 1 commit into
mainfrom
cursor/cli-upgrade-alias-c2f7
Aug 19, 2026
Merged

feat(cli): add chm upgrade alias and explicit update fallbacks#3147
duyetbot merged 1 commit into
mainfrom
cursor/cli-upgrade-alias-c2f7

Conversation

@duyet

@duyet duyet commented Aug 19, 2026

Copy link
Copy Markdown
Member

Closes #3145.

chm upgrade is a first-class alias of chm update (same --check / --version flags, same cli_run/update telemetry). Self-update now prints current -> target version, and checksum / permission / unsupported-target failures are explicit with a copy-pasteable fallback (scripts/install.sh or cargo install ch-monitor-cli --force). The command never invokes sudo.

Summary

Users say upgrade as often as update. The CLI, installer, and docs now treat them as one product without breaking chm update.

Changes

  • chm upgrade and chm update share UpdateArgs (--check, --version) in rust/ch-monitor-cli/src/main.rs
  • Self-update UX in src/update.rs: print chm vX -> tag before work; checksum / permission / unsupported-target errors include install.sh or cargo fallback; never a sudo command
  • scripts/install.sh: missing/empty checksum is fatal (no silent unverified install); unwritable dir suggests CHM_INSTALL_DIR / cargo instead of a doomed temp-path sudo cp; mentions chm upgrade
  • Docs kept in sync: rust/ch-monitor-cli/README.md, docs/content/guide/guides/diagnostics-cli.mdx, docs/knowledge/standalone-cli.md
  • rust/Cargo.lock package version aligned to crate 0.1.1 (no version bump)

Left alone

  • chm update kept as-is for existing scripts
  • Telemetry stays ("cli_run", "update") for both commands; CHM_LICENSE_KEY honor-system ping unchanged
  • No Homebrew / crates.io / DRM / new product features
  • release-please configs and chm-v* release PRs not touched

Test plan

  • cargo test --locked in rust/ch-monitor-cli — 39 passed (version parse, newest-tag pick, alias wiring, fallback copy-paste)
  • cargo clippy --locked -- -D warnings clean
  • cargo fmt --all -- --check clean
  • chm --help lists both update and upgrade; chm upgrade --help exposes --check and --version
  • bash -n scripts/install.sh
  • pnpm run lint — not applicable (Rust CLI / docs / install script only)
  • pnpm run build — not applicable
  • pnpm run type-check:test — not applicable
  • pnpm run test:unit — not applicable
  • Docs updated in docs/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 than install.sh, which would also refuse that platform.


Co-Authored-By: duyetbot bot@duyet.net

Open in Web Open in Cursor 

Co-Authored-By: duyetbot <bot@duyet.net>

Co-authored-by: duyet <duyet@users.noreply.github.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation area: rust Rust monitor-core / WASM labels Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

@duyetbot
duyetbot merged commit 7889840 into main Aug 19, 2026
25 checks passed
@duyetbot
duyetbot deleted the cursor/cli-upgrade-alias-c2f7 branch August 19, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: rust Rust monitor-core / WASM documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve chm CLI and the upgrade/update path

3 participants