feat: add ty plugins remove to uninstall a plugin#678
Merged
Conversation
`ty plugins` could install (`add`) and inspect plugins but not remove one — uninstalling meant hand-deleting a directory. Add `remove` (aliases `rm`, `uninstall`) as the inverse of `add`. - Matches by the manifest name shown in `plugins list`, falling back to the directory base name, so it works when the two differ. - Guards against deleting anything outside the plugins dir (a corrupt manifest can't redirect the delete). - Collection-repo aware: a plugin nested in a multi-plugin git checkout has only its own subdir removed, and the caller is told the shared checkout/siblings remain and a later `add` may restore it. Tests cover single-repo removal, collection removal leaving siblings, dir-name matching, and the unknown-plugin error. Docs updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
ty plugins remove <name>(aliasesrm,uninstall) — the missing inverse ofty plugins add. Until nowty pluginscould install and inspect plugins but the only way to uninstall one was to hand-delete a directory.Behavior
ty plugins list, falling back to the directory base name, so it works even when the two differ.taskyou/pluginscollection) has only its own subdirectory removed; the shared checkout and sibling plugins stay, and the user is warned that re-runningaddon the source may restore it.Tests
cmd/task/plugins_remove_test.gocovers:inCheckoutdocs/plugins.mdgets a Removing section.🤖 Generated with Claude Code