# `Minga.Tool.Recipe.Registry`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/tool/recipe/registry.ex#L1)

ETS-backed registry of tool installation recipes.

Holds all known recipes for installable tools (LSP servers, formatters,
linters). Recipes are contributed at runtime by bundled recipe packs
(via `Minga.Extensions.RecipePacks`) or user config. Provides fast
lookups by tool name, command string, and category.

Follows the same pattern as `Minga.Language.Registry`.

## Lookups

- `get/1` - look up a recipe by name atom
- `for_command/1` - find the recipe that provides a given command string
- `all/0` - list all recipes
- `by_category/1` - filter recipes by category

# `contribution_source`

```elixir
@type contribution_source() :: :config | {:extension, atom()}
```

Source that contributed registry entries.

# `name`

```elixir
@type name() :: atom()
```

# `register_error`

```elixir
@type register_error() ::
  {:duplicate_recipe, atom(), contribution_source(), contribution_source()}
```

# `all`

```elixir
@spec all() :: [Minga.Tool.Recipe.t()]
```

Returns all registered recipes.

# `by_category`

```elixir
@spec by_category(Minga.Tool.Recipe.category()) :: [Minga.Tool.Recipe.t()]
```

Returns recipes filtered by category.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `for_command`

```elixir
@spec for_command(String.t()) :: Minga.Tool.Recipe.t() | nil
```

Returns the recipe whose `provides` list includes the given command string.

# `for_language`

```elixir
@spec for_language(atom()) :: [Minga.Tool.Recipe.t()]
```

Returns all recipes that serve a given language.

# `get`

```elixir
@spec get(name()) :: Minga.Tool.Recipe.t() | nil
```

Returns the recipe for a given tool name, or nil.

# `labels`

```elixir
@spec labels([name()]) :: %{required(name()) =&gt; String.t()}
```

Display labels for tool names, falling back to the name itself when no recipe is registered. Resolved here so pure mode state can carry labels instead of reading ETS.

# `register`

```elixir
@spec register(Minga.Tool.Recipe.t()) :: :ok | {:error, register_error()}
```

Registers a config-owned recipe.

# `register`

```elixir
@spec register(Minga.Tool.Recipe.t(), contribution_source()) ::
  :ok | {:error, register_error()}
```

Registers a recipe with explicit source ownership.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

# `unregister_source`

```elixir
@spec unregister_source(contribution_source()) :: :ok
```

Removes every recipe contributed by a source.

---

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