ClaudeCode.Plugin (ClaudeCode v0.36.3)
View SourcePlugin management functions wrapping the claude plugin CLI commands.
Provides functions to install, uninstall, enable, disable, update, list, and validate plugins from configured marketplaces.
All functions resolve the CLI binary via the internal Adapter.Port.Resolver and execute commands synchronously via the system command abstraction.
Note: Remote node support is not yet implemented — these commands run on the local machine only.
Examples
# List installed plugins
{:ok, plugins} = ClaudeCode.Plugin.list()
# Install a plugin from a marketplace
{:ok, _} = ClaudeCode.Plugin.install("code-simplifier@claude-plugins-official")
# Enable/disable a plugin
{:ok, _} = ClaudeCode.Plugin.enable("code-simplifier@claude-plugins-official")
{:ok, _} = ClaudeCode.Plugin.disable("code-simplifier@claude-plugins-official")
Summary
Functions
Disables an enabled plugin.
Disables all enabled plugins.
Enables a disabled plugin.
Installs a plugin from available marketplaces.
Lists installed plugins.
Uninstalls an installed plugin.
Updates a plugin to the latest version.
Types
@type scope() :: :user | :project | :local
Functions
Disables an enabled plugin.
Options
:scope- Scope::user,:project, or:local(default: auto-detect)
Examples
{:ok, _} = ClaudeCode.Plugin.disable("code-simplifier@claude-plugins-official")
Disables all enabled plugins.
Options
:scope- Scope::user,:project, or:local(default: auto-detect)
Examples
{:ok, _} = ClaudeCode.Plugin.disable_all()
{:ok, _} = ClaudeCode.Plugin.disable_all(scope: :project)
Enables a disabled plugin.
Options
:scope- Scope::user,:project, or:local(default: auto-detect)
Examples
{:ok, _} = ClaudeCode.Plugin.enable("code-simplifier@claude-plugins-official")
Installs a plugin from available marketplaces.
Use plugin@marketplace format for a specific marketplace, or just plugin
to search all configured marketplaces.
Options
:scope- Installation scope::user(default),:project, or:local
Examples
{:ok, _} = ClaudeCode.Plugin.install("code-simplifier@claude-plugins-official")
{:ok, _} = ClaudeCode.Plugin.install("my-plugin@my-org", scope: :project)
Lists installed plugins.
Returns a list of %ClaudeCode.Plugin{} structs parsed from
claude plugin list --json.
Examples
{:ok, plugins} = ClaudeCode.Plugin.list()
Enum.each(plugins, fn p -> IO.puts("#{p.id} (enabled: #{p.enabled})") end)
Uninstalls an installed plugin.
Options
:scope- Uninstall from scope::user(default),:project, or:local
Examples
{:ok, _} = ClaudeCode.Plugin.uninstall("code-simplifier@claude-plugins-official")
Updates a plugin to the latest version.
A session restart is required for updates to take effect.
Options
:scope- Scope::user,:project,:local, or:managed
Examples
{:ok, _} = ClaudeCode.Plugin.update("code-simplifier@claude-plugins-official")