ClaudeWrapper.Commands.Plugin (ClaudeWrapper v0.7.0)

Copy Markdown View Source

Plugin management commands.

Wraps claude plugin install|uninstall|list|enable|disable|update|validate.

Usage

config = ClaudeWrapper.Config.new()

# List installed plugins
{:ok, plugins} = ClaudeWrapper.Commands.Plugin.list(config)

# List with available marketplace plugins
{:ok, plugins} = ClaudeWrapper.Commands.Plugin.list(config, available: true)

# Install a plugin
{:ok, _} = ClaudeWrapper.Commands.Plugin.install(config, "my-plugin")

# Install from a specific marketplace
{:ok, _} = ClaudeWrapper.Commands.Plugin.install(config, "my-plugin@my-marketplace")

# Enable / disable
{:ok, _} = ClaudeWrapper.Commands.Plugin.enable(config, "my-plugin")
{:ok, _} = ClaudeWrapper.Commands.Plugin.disable(config, "my-plugin")

Summary

Functions

Disable an enabled plugin.

Enable a disabled plugin.

Install a plugin from available marketplaces.

List installed plugins.

Uninstall an installed plugin.

Update a plugin to the latest version.

Validate a plugin or marketplace manifest at the given path.

Types

scope()

@type scope() :: :user | :project | :local

Functions

disable(config, plugin \\ nil, opts \\ [])

@spec disable(ClaudeWrapper.Config.t(), String.t() | nil, keyword()) ::
  {:ok, String.t()} | {:error, term()}

Disable an enabled plugin.

Options

  • :scope - Scope (:user, :project, or :local). Default: auto-detect.
  • :all - Disable all enabled plugins (boolean).

enable(config, plugin, opts \\ [])

@spec enable(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Enable a disabled plugin.

Options

  • :scope - Scope (:user, :project, or :local). Default: auto-detect.

install(config, plugin, opts \\ [])

@spec install(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Install a plugin from available marketplaces.

Use "name@marketplace" to install from a specific marketplace.

Options

  • :scope - Installation scope (:user, :project, or :local). Default: :user.

list(config, opts \\ [])

@spec list(
  ClaudeWrapper.Config.t(),
  keyword()
) :: {:ok, [map()]} | {:error, term()}

List installed plugins.

Options

  • :available - Include available plugins from marketplaces (boolean, requires JSON output)

uninstall(config, plugin, opts \\ [])

@spec uninstall(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Uninstall an installed plugin.

Options

  • :scope - Scope to uninstall from (:user, :project, or :local). Default: :user.
  • :keep_data - Preserve the plugin's persistent data directory (boolean).

update(config, plugin, opts \\ [])

@spec update(ClaudeWrapper.Config.t(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Update a plugin to the latest version.

Options

  • :scope - Scope (:user, :project, :local, or :managed). Default: :user.

validate(config, path)

@spec validate(ClaudeWrapper.Config.t(), String.t()) ::
  {:ok, String.t()} | {:error, term()}

Validate a plugin or marketplace manifest at the given path.