Skip to content

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

Open
akshayatam wants to merge 1 commit into
basecompute:mainfrom
akshayatam:feat/rm-model
Open

feat(cli): add rm model command#60
akshayatam wants to merge 1 commit into
basecompute:mainfrom
akshayatam:feat/rm-model

Conversation

@akshayatam

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:

  • cargo test passes, including all 8 rm end-to-end tests
  • cargo clippy passes
  • cargo fmt --check reports existing formatting differences in unrelated files not modified by this PR

Documentation

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

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