MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / disablePlugin

Function disablePlugin

src/services/plugins/pluginCliCommands.ts:231–264  ·  view source on GitHub ↗
(
  plugin: string,
  scope?: InstallableScope,
)

Source from the content-addressed store, hash-verified

229 * @param scope Optional scope. If not provided, finds the most specific scope for the current project.
230 */
231export async function disablePlugin(
232 plugin: string,
233 scope?: InstallableScope,
234): Promise<void> {
235 try {
236 const result = await disablePluginOp(plugin, scope)
237
238 if (!result.success) {
239 throw new Error(result.message)
240 }
241
242 console.log(`${figures.tick} ${result.message}`)
243
244 const { name, marketplace } = parsePluginIdentifier(
245 result.pluginId || plugin,
246 )
247 logEvent('tengu_plugin_disabled_cli', {
248 _PROTO_plugin_name:
249 name as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
250 ...(marketplace && {
251 _PROTO_marketplace_name:
252 marketplace as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
253 }),
254 scope:
255 result.scope as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
256 ...buildPluginTelemetryFields(name, marketplace, getManagedPluginNames()),
257 })
258
259 // eslint-disable-next-line custom-rules/no-process-exit
260 process.exit(0)
261 } catch (error) {
262 handlePluginCommandError(error, 'disable', plugin)
263 }
264}
265
266/**
267 * CLI command: Disable all enabled plugins non-interactively

Callers 1

pluginDisableHandlerFunction · 0.85

Calls 6

disablePluginOpFunction · 0.85
parsePluginIdentifierFunction · 0.85
logEventFunction · 0.85
getManagedPluginNamesFunction · 0.85
handlePluginCommandErrorFunction · 0.85

Tested by

no test coverage detected