# find_project_root

> **Function** in `deepagents_code`

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

Find the project root by looking for git metadata.

## Signature

```python
find_project_root(
    start_path: str | Path | None = None,
) -> Path | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start_path` | `str \| Path \| None` | No | Directory to start searching from. Defaults to current working directory. (default: `None`) |

## Returns

`Path | None`

Path to the project root if found, None otherwise.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/project_utils.py#L136)