diff --git a/docs/concepts/projects/dependencies.md b/docs/concepts/projects/dependencies.md index 4e5a5f084..1d438d19e 100644 --- a/docs/concepts/projects/dependencies.md +++ b/docs/concepts/projects/dependencies.md @@ -321,7 +321,19 @@ dependencies = ["httpx"] httpx = { git = "https://github.com/encode/httpx", rev = "326b9431c761e1ef1e00b9f760d1f654c8db48c6" } ``` -A `subdirectory` may be specified if the package isn't in the repository root. +A `subdirectory` may be specified if the package isn't in the repository root: + +```console +$ uv add git+https://github.com/langchain-ai/langchain#subdirectory=libs/langchain +``` + +```toml title="pyproject.toml" +[project] +dependencies = ["langchain"] + +[tool.uv.sources] +langchain = { git = "https://github.com/langchain-ai/langchain", subdirectory = "libs/langchain" } +``` ### URL