# upgrade_command

> **Function** in `deepagents_cli`

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

Return the shell command to upgrade `deepagents-cli`.

Falls back to the pip command for unrecognized install methods.

## Signature

```python
upgrade_command(
    method: InstallMethod | None = None,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `method` | `InstallMethod \| None` | No | Install method override.  Auto-detected if `None`. (default: `None`) |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a827cddf72d72e4b17921b8eb445a3bfb0511cb4/libs/cli/deepagents_cli/update_check.py#L325)