# 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/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/project_utils.py#L136)