# `ClaudeWrapper.Commands.Marketplace`
[🔗](https://github.com/genagent/claude_wrapper_ex/blob/main/lib/claude_wrapper/commands/marketplace.ex#L1)

Plugin marketplace management commands.

Wraps `claude plugin marketplace add|remove|list|update`.

## Usage

    config = ClaudeWrapper.Config.new()

    # List configured marketplaces
    {:ok, marketplaces} = ClaudeWrapper.Commands.Marketplace.list(config)

    # Add a marketplace from a URL or GitHub repo
    {:ok, _} = ClaudeWrapper.Commands.Marketplace.add(config, "https://github.com/org/marketplace")

    # Add with sparse checkout for monorepos
    {:ok, _} = ClaudeWrapper.Commands.Marketplace.add(config, "https://github.com/org/repo",
      sparse: [".claude-plugin", "plugins"]
    )

    # Remove a marketplace
    {:ok, _} = ClaudeWrapper.Commands.Marketplace.remove(config, "my-marketplace")

    # Update all marketplaces
    {:ok, _} = ClaudeWrapper.Commands.Marketplace.update(config)

# `scope`

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

# `add`

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

Add a marketplace from a URL, path, or GitHub repo.

## Options

  * `:scope` - Where to declare the marketplace (`:user`, `:project`, or `:local`). Default: `:user`.
  * `:sparse` - List of directories for git sparse-checkout (for monorepos).

# `list`

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

List all configured marketplaces.

# `remove`

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

Remove a configured marketplace by name.

## Options

  * `:scope` - Scope to remove from (`:user`, `:project`, or `:local`).
    Omit to remove from all scopes.

# `update`

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

Update marketplace(s) from their source.

If no name is given, updates all marketplaces.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
