# perform_install_extra

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/update_check/perform_install_extra)

Add `extra` to the installed dcode tool environment.

Runs `uv tool install -U 'deepagents-code[<extras>]'`, preserving any
extras that are already installed. Editable installs are refused — the
caller should rerun their `uv tool install --editable` command with `--with
'deepagents-code[<extra>]'` added so the extra is resolved against the
editable source.

## Signature

```python
perform_install_extra(
    extra: str,
    *,
    progress: UpgradeProgressCallback | None = None,
    log_path: Path | None = None,
) -> tuple[bool, str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `extra` | `str` | Yes | The extra name to install. Must satisfy `is_valid_extra_name`; invalid names are rejected without invoking uv (defense in depth against shell injection via the `--force`/`--yes` bypass paths). |
| `progress` | `UpgradeProgressCallback \| None` | No | Optional callback invoked for each output line. (default: `None`) |
| `log_path` | `Path \| None` | No | Optional path to persist command output. (default: `None`) |

## Returns

`tuple[bool, str]`

`(success, output)` — *output* is the combined stdout/stderr, or an
explanatory error message when the install method is unsupported
or `extra` is malformed.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/update_check.py#L1280)