Skip to content

Commit 8d3c6f0

Browse files
committed
docs: add documentation for lfs usage and configuration
1 parent e3ed692 commit 8d3c6f0

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

docs/concepts/projects/dependencies.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,30 @@ dependencies = ["langchain"]
350350
langchain = { git = "https://github.com/langchain-ai/langchain", subdirectory = "libs/langchain" }
351351
```
352352

353+
Support for [Git LFS](https://git-lfs.com) is also configurable per source.
354+
355+
```console
356+
$ uv add --lfs git+https://example.com/org/lfs-enabled-repo
357+
```
358+
359+
```toml title="pyproject.toml"
360+
[project]
361+
dependencies = ["test-lfs-repo"]
362+
363+
[tool.uv.sources]
364+
test-lfs-repo = { git = "https://example.com/org/lfs-enabled-repo", lfs = true }
365+
```
366+
367+
- When `lfs = true`, uv will always fetch LFS objects for this git source.
368+
- When `lfs = false`, uv will never fetch LFS objects for this git source.
369+
- When omitted, `UV_GIT_LFS` environment variable takes precedence for all git sources without an
370+
explicit `lfs` configuration.
371+
372+
!!! warning
373+
374+
Ensure Git LFS is installed and configured on your system before attempting to install sources
375+
using Git LFS, otherwise a build failure can occur.
376+
353377
### URL
354378

355379
To add a URL source, provide a `https://` URL to either a wheel (ending in `.whl`) or a source

docs/guides/tools.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ Or even a specific commit:
142142
$ uvx --from git+https://github.com/httpie/cli@2843b87 httpie
143143
```
144144

145+
Or with [Git LFS](https://git-lfs.com) support:
146+
147+
```console
148+
$ uvx --lfs --from git+https://example.com/org/lfs-enabled-repo lfs-enabled-executable
149+
```
150+
145151
## Commands with plugins
146152

147153
Additional dependencies can be included, e.g., to include `mkdocs-material` when running `mkdocs`:
@@ -207,6 +213,12 @@ And, similarly, for package sources:
207213
$ uv tool install git+https://github.com/httpie/cli
208214
```
209215

216+
Or package sources with [Git LFS](https://git-lfs.com):
217+
218+
```console
219+
$ uv tool install --lfs git+https://example.com/org/lfs-enabled-repo
220+
```
221+
210222
As with `uvx`, installations can include additional packages:
211223

212224
```console

0 commit comments

Comments
 (0)