Skip to content

[3/5] Aitools: update, uninstall, and version commands#4812

Open
simonfaltum wants to merge 5 commits intosimonfaltum/aitools-pr2-installfrom
simonfaltum/aitools-pr3-lifecycle
Open

[3/5] Aitools: update, uninstall, and version commands#4812
simonfaltum wants to merge 5 commits intosimonfaltum/aitools-pr2-installfrom
simonfaltum/aitools-pr3-lifecycle

Conversation

@simonfaltum
Copy link
Member

@simonfaltum simonfaltum commented Mar 22, 2026

PR Stack

  1. [1/5] State + release discovery + directory rename ([1/5] Aitools: state tracking, manifest source, directory rename #4810)
  2. [2/5] Install writes state + interactive agent selection ([2/5] Aitools: install writes state, interactive agent selection, idempotent install #4811)
  3. [3/5] Update + uninstall + version commands (this PR)
  4. [4/5] List improvements + command restructuring + flags ([4/5] Aitools: list command, flat structure, --skills/--agents/--include-experimental flags #4813)
  5. [5/5] Project scope (--project/--global) (pending)

Base: simonfaltum/aitools-pr2-install (PR 2)

Why

Users can install skills but can't update, uninstall, or check what version they have. These are core lifecycle gaps.

Changes

Three new commands, each small but grouped because they share patterns.

aitools update: Compares installed release against latest. Downloads changed skills. Flags: --check (dry run), --force (re-download), --no-new (don't auto-add new manifest skills). Authoritative release detection (distinguishes real API response from fallback). Applies experimental and min_cli_version filtering. Warns on skills removed from manifest.

aitools uninstall: Removes skill directories from canonical location. Removes symlinks from ALL agent directories (full registry scan, not just detected). Cleans orphaned symlinks. Only removes symlinks pointing to canonical dir (safe for third-party skills). Deletes .state.json on success.

aitools version: Shows installed version, skill count, last updated date. Best-effort staleness check against latest release. Graceful offline degradation. Suppresses staleness check when DATABRICKS_SKILLS_REF is set.

Test plan

  • Update: no state -> error, already up to date, version diff, check dry run, force, no-new, new skill auto-installed, removed skill warning
  • Uninstall: removes dirs + symlinks, orphan cleanup, state deletion, no state -> error, missing dirs handled
  • Version: installed/up-to-date, update available, not installed, offline graceful
  • All lint checks pass

Adds three new commands to the aitools skill management:
- `update`: Updates installed skills to latest release with --check (dry run),
  --force, and --no-new flags. Auto-adds new manifest skills by default.
- `uninstall`: Removes all installed skills, symlinks from all registry agents,
  cleans orphaned symlinks, and deletes state file.
- `version`: Shows installed version, skill count, staleness check against
  latest release.

Co-authored-by: Isaac
…fety, output format

- FetchLatestRelease returns (string, bool, error) so callers can distinguish
  real API responses from fallback defaults. Update and version commands use
  the authoritative flag to gate staleness checks.
- Update now filters experimental and min_cli_version skills using the same
  logic as install. Warns when a skill is removed from the manifest.
- Uninstall only removes symlinks pointing into the canonical skills dir,
  preserving user-managed directories and external symlinks.
- FormatUpdateResult accepts a check flag to use "Would update" wording.
- Version output matches the spec format (Databricks AI Tools header, skill
  count, staleness status on the same line).
- Consistent "no install" messaging across update, uninstall, and version.
- Added tests for removed-skill warning, experimental/min_cli_version
  filtering in update, check-mode output, and symlink-only uninstall.

Co-authored-by: Isaac
@simonfaltum simonfaltum force-pushed the simonfaltum/aitools-pr3-lifecycle branch from 14680ad to 2dd4a43 Compare March 22, 2026 22:00
@simonfaltum simonfaltum marked this pull request as ready for review March 22, 2026 22:02
@simonfaltum simonfaltum requested review from a team and lennartkats-db as code owners March 22, 2026 22:02
@github-actions
Copy link

Suggested reviewers

Based on git history of the changed files, these people are best suited to review:

  • @arsenyinfo -- recent work in experimental/aitools/lib/installer/, experimental/aitools/cmd/

Confidence: high

Eligible reviewers

Based on CODEOWNERS, these people or teams could also review:

@databricks/eng-apps-devex, @lennartkats-db

Suggestions based on git history of 11 changed files (3 scored). See CODEOWNERS for path-specific ownership rules.

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