MCPcopy Index your code
hub / github.com/codeaashu/claude-code / uninstallPlugin

Function uninstallPlugin

src/services/plugins/pluginCliCommands.ts:153–188  ·  view source on GitHub ↗
(
  plugin: string,
  scope: InstallableScope = 'user',
  keepData = false,
)

Source from the content-addressed store, hash-verified

151 * @param scope Uninstall from scope: user, project, or local (defaults to 'user')
152 */
153export async function uninstallPlugin(
154 plugin: string,
155 scope: InstallableScope = 'user',
156 keepData = false,
157): Promise<void> {
158 try {
159 const result = await uninstallPluginOp(plugin, scope, !keepData)
160
161 if (!result.success) {
162 throw new Error(result.message)
163 }
164
165 // biome-ignore lint/suspicious/noConsole:: intentional console output
166 console.log(`${figures.tick} ${result.message}`)
167
168 const { name, marketplace } = parsePluginIdentifier(
169 result.pluginId || plugin,
170 )
171 logEvent('tengu_plugin_uninstalled_cli', {
172 _PROTO_plugin_name:
173 name as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
174 ...(marketplace && {
175 _PROTO_marketplace_name:
176 marketplace as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
177 }),
178 scope: (result.scope ||
179 scope) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
180 ...buildPluginTelemetryFields(name, marketplace, getManagedPluginNames()),
181 })
182
183 // eslint-disable-next-line custom-rules/no-process-exit
184 process.exit(0)
185 } catch (error) {
186 handlePluginCommandError(error, 'uninstall', plugin)
187 }
188}
189
190/**
191 * CLI command: Enable a plugin non-interactively

Callers 1

pluginUninstallHandlerFunction · 0.85

Calls 6

uninstallPluginOpFunction · 0.85
parsePluginIdentifierFunction · 0.85
logEventFunction · 0.85
getManagedPluginNamesFunction · 0.85
handlePluginCommandErrorFunction · 0.85

Tested by

no test coverage detected