Skip to content

feat(cli): add rm model command - #60

Open
akshayatam wants to merge 3 commits into
basecompute:mainfrom
akshayatam:feat/rm-model
Open

akshayatam wants to merge 3 commits into
basecompute:mainfrom
akshayatam:feat/rm-model

Conversation

@akshayatam

@akshayatam akshayatam commented Sep 8, 2026 •

Copy link
Copy Markdown

Closes #59

Summary

Adds basert rm <model> to remove a locally installed model from the BaseRT model cache.

Behavior

  • Removes all locally installed variants of the specified model.
  • Returns a clear error when the requested model is not installed.
  • Rejects unsafe model IDs before performing deletion.
  • Preserves sibling models, unrelated files, and source/staging data.
  • Avoids following model, variant, artifact, and sidecar symlinks during removal.
  • Respects BASERT_MODELS_DIR when using a custom model cache.

Testing

Added end-to-end coverage for the rm command, including:

  • successful removal of all variants for a model
  • preservation of sibling and nested models
  • missing and uninstalled models
  • unsafe model IDs
  • symlink handling
  • sidecar handling
  • custom model cache paths
  • CLI help and required argument behavior

Also manually verified removal with multiple models installed in an isolated cache.

Validation performed against the latest upstream main:

  • cargo test -p base-convert --test rm_e2e - passed (8/8)
  • cargo test --workspace - passed (2 ignored)
  • cargo clippy --workspace --all-targets - passed
  • cargo fmt --all --check - passed
  • git diff --check - passed

Updated the end-to-end test fixture for compatibility with the latest upstream HubSidecar structure.

Documentation

Updated the CLI overview, command reference, and model management guide to document basert rm <model>.

@akshayatam

Copy link
Copy Markdown
Author

Hello maintainers,

I have synced this PR with the latest upstream main and resolved the merge conflicts.

I also updated the test fixture to accommodate the latest HubSidecar changes and reran the full workspace tests: all 8 rm end-to-end tests, Clippy, and formatting checks locally. Everything passes.

GitHub Actions is currently awaiting maintainer approval to run the CI workflow.

The PR should be ready for review. Thanks!

This branch has not been deployed

No deployments
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.

Feature Request: Add rm <model> Command

1 participant