https://github.com/dfetch-org/dfetch
Dependency fetcher
https://github.com/dfetch-org/dfetch
dependencies dependency-manager git svn vendoring
Last synced: 4 months ago
JSON representation
Dependency fetcher
- Host: GitHub
- URL: https://github.com/dfetch-org/dfetch
- Owner: dfetch-org
- License: mit
- Created: 2020-10-14T14:22:45.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-22T22:02:25.000Z (4 months ago)
- Last Synced: 2026-02-23T02:21:09.379Z (4 months ago)
- Topics: dependencies, dependency-manager, git, svn, vendoring
- Language: Python
- Homepage: https://dfetch.rtfd.io/
- Size: 10 MB
- Stars: 12
- Watchers: 4
- Forks: 5
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README

[](https://codescene.io/projects/10989)
[](https://codescene.io/projects/10989)
[](https://app.codacy.com/gh/dfetch-org/dfetch?utm_source=github.com&utm_medium=referral&utm_content=dfetch-org/dfetch&utm_campaign=Badge_Grade)
[](https://www.codacy.com/gh/dfetch-org/dfetch/dashboard?utm_source=github.com&utm_medium=referral&utm_content=dfetch-org/dfetch&utm_campaign=Badge_Coverage)
[](https://dfetch.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/dfetch-org/dfetch/actions)
[](https://github.com/psf/black)
[](https://github.com/dfetch-org/dfetch/blob/main/LICENSE)
[](https://gitter.im/dfetch-org/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://libraries.io/github/dfetch-org/dfetch)

[](https://github.com/dfetch-org/dfetch/issues)

[](https://pypi.org/project/dfetch/)
[](https://codespaces.new/dfetch-org/dfetch)
[](https://www.bestpractices.dev/projects/11245)
**DFetch can manage dependencies**
We make products that can last 15+ years; because of this we want to be able to have all sources available
to build the entire project from source without depending on external resources.
For this, we needed a dependency manager that was flexible enough to retrieve dependencies as plain text
from various sources. `svn externals`, `git submodules` and `git subtrees` solve a similar
problem, but not in a VCS-agnostic way or completely user-friendly way.
We want self-contained code repositories without any hassle for end-users.
Dfetch must promote upstreaming changes, but allow for local customizations.
The problem is described thoroughly in [managing external dependencies](https://embeddedartistry.com/blog/2020/06/22/qa-on-managing-external-dependencies/) and sometimes
is also known as [*vendoring*](https://dfetch.readthedocs.io/en/latest/vendoring.html).
Other tools that do similar things are ``Zephyr's West``, ``CMake ExternalProject`` and other meta tools.
See [alternatives](https://dfetch.readthedocs.io/en/latest/alternatives.html) for a complete list.
[**Getting started**](https://dfetch.readthedocs.io/en/latest/getting_started.html) |
[**Manual**](https://dfetch.readthedocs.io/en/latest/manual.html) |
[**Troubleshooting**](https://dfetch.readthedocs.io/en/latest/troubleshooting.html) |
[**Contributing**](https://dfetch.readthedocs.io/en/latest/contributing.html)
## Problems DFetch Solves
* Declarative code reuse across projects ([inner sourcing](https://about.gitlab.com/topics/version-control/what-is-innersource/))
* Compose multi-repo code bases into a single working tree
* Vendoring dependencies for reproducible builds
* Apply local patches while keeping upstream syncable
* VCS-agnostic dependency management
* Self-contained exports for releases or audits
## Install
### Stable
```bash
pip install dfetch
```
### latest version
```bash
pip install git+https://github.com/dfetch-org/dfetch.git#egg=dfetch
```
### Binary distributions
Each release on the [releases page](https://github.com/dfetch-org/dfetch/releases) provides installers for all major platforms.
- Linux `.deb` & `.rpm`
- macOS `.pkg`
- Windows `.msi`
## Github Action
You can use DFetch in your Github Actions workflow to check your dependencies.
The results will be uploaded to Github. Add the following to your workflow file:
```yaml
jobs:
dfetch-check:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Run Dfetch Check
uses: dfetch-org/dfetch@main
with:
working-directory: '.' # optional, defaults to project root
```