Skip to content

feat: add arborist update subcommand for self-updating#9

Merged
montfort merged 1 commit intomainfrom
feat/update-subcommand
Apr 4, 2026
Merged

feat: add arborist update subcommand for self-updating#9
montfort merged 1 commit intomainfrom
feat/update-subcommand

Conversation

@montfort
Copy link
Copy Markdown
Contributor

@montfort montfort commented Apr 4, 2026

Summary

  • Restructure CLI from flat CliArgs to Cli + Command + AnalyzeArgs with optional subcommands
  • Add arborist update subcommand that self-updates from GitHub Releases using self_update crate
  • Add arborist update --check to check for new versions without installing
  • Detect cargo-installed binaries and suggest cargo install arborist-cli instead of self-replace
  • Full backward compatibility: arborist [PATHS] [OPTIONS] works exactly as before

Changes

  • src/cli.rs — restructured to Cli (Parser) + Command (Subcommand) + AnalyzeArgs (Args)
  • src/update.rs — new module with GitHub Releases self-update logic
  • src/main.rs — dispatch on cli.command variant
  • src/lib.rs, src/analysis.rs, src/output/{mod,table}.rsCliArgsAnalyzeArgs rename

Test plan

  • cargo test — 29 existing integration tests pass (backward compatible)
  • arborist tests/fixtures/complex.rs — analysis works as before
  • arborist update --check — runs (404 expected with no releases yet)
  • cargo fmt --check and cargo clippy pass

🤖 Generated with Claude Code

Restructure CLI from flat args to optional subcommands (backward
compatible). Add `arborist update` to self-update from GitHub Releases
and `arborist update --check` to check for new versions. Detects
cargo-installed binaries and suggests `cargo install` instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit 1336e4e into main Apr 4, 2026
4 checks passed
@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Apr 4, 2026

CLA assistant check
All committers have signed the CLA.

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