feat(cli): deepcode plugins install / uninstall#131
Merged
Conversation
The install backends (installLocal / installFromGithub / installFromNpm / uninstallPlugin) existed but had no CLI entry point. Extends the `plugins` command: - `deepcode plugins install <spec>` — routes by spec: `gh:owner/repo[@ref]` → GitHub, `<name>@npm` → npm, otherwise a local path → installLocal. Records user-trust so the plugin loads immediately. - `deepcode plugins uninstall <name>` — removes it (exit 1 if not found). - `plugins list` unchanged. Tests: +3 (list-cmd.test.ts) — local install then trusted-list round-trip, install→uninstall→already-gone, and routing guards (no-spec→exit 2, bad gh spec→exit 1). CLI suite 101 green. (gh/npm network paths route + validate synchronously; the clone/pack itself isn't exercised offline.) 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.
Summary
The plugin install backends (
installLocal/installFromGithub/installFromNpm/uninstallPlugin) existed in core but had no CLI entry point (the audit's gap). Extends thepluginscommand:deepcode plugins install <spec>— routes by spec shape:gh:owner/repo[@ref]→ GitHub clone,<name>@npm(or<name>@<ver>@npm) → npm, otherwise a local path →installLocal. Records user-trust so the plugin loads immediately.deepcode plugins uninstall <name>— removes it (exit 1 if not found).plugins listunchanged.Tests
+3 (
list-cmd.test.ts): local install → trusted-list round-trip; install → uninstall → already-gone; routing guards (no spec → exit 2, badgh:spec → "Invalid GitHub spec" exit 1). CLI suite 101 green. The gh/npm paths route + validate the spec synchronously; the actual clone/pack isn't exercised offline.🤖 Generated with Claude Code