Automatically synchronize the dependencies of a project by the DEPS configuration file
JavaScript
21
125 commits
updated Jun 25, 2026
A command line tool for automatically synchronizing the dependencies of a project by the DEPS configuration file.
The depsync tool provides a convenient way to download git repositories and files from the Internet, offering several key advantages over similar capabilities like git-submodules and git-lfs:
With all the advantages described above, all it takes is one straightforward command depsync. Execute it in the root of your main project, and you're good to go!
npm install depsync -g
Run the following command in the directory with a DEPS file:
depsync [platform] [options]
For example, if you want to synchronize the mac platform, run:
depsync mac
If you don't pass any platform parameter, it will automatically choose the host platform as the target platform. So the result of running depsync in macOS is the same to running depsync mac.
The available platform names are defined in the DEPS file, you can also define any other platform names as you want, such as ios, android... but only the mac, win and linux can be automatically chosen.
-h, --helpPrint help message with available options.
depsync --help
-v, --versionPrint the current version of depsync.
depsync --version
-p, --project <directory>Synchronize the project in the specified directory instead of the current directory.
depsync --project /path/to/your/project
depsync mac --project /usr/local/myproject
-c, --cleanClean the repos and files in current directory that do not exist in the DEPS file. This helps remove outdated dependencies.
depsync --clean
--non-recursiveSkip synchronizing the sub-projects. By default, depsync will recursively process DEPS files in all sub-repositories.
depsync --non-recursive
depsync mac --non-recursive
--mirror <mappings>Redirect repository and file URLs to mirror sources. This is particularly useful when:
Format: 'old_prefix->new_prefix' for single mapping, or 'old1->new1,old2->new2' for multiple mappings.
# Single mirror
depsync --mirror 'https://github.com/libpag/->https://gitee.com/pago/'
# Multiple mirrors (comma-separated)
depsync --mirror 'https://github.com/->https://gitee.com/,https://gitlab.com/->https://internal.company.com/'
The mirror option will replace URL prefixes for both repository URLs and file download URLs throughout the entire dependency tree.
Here is an example of DEPS file:
{
"version": "1.4.6",
"vars": {
"GIT_DOMAIN": "github.com",
"SKIA_ROOT": "https://github.com/domchen/depsync/releases/download/1.0.1",
"V8_ROOT": "https://github.com/domchen/depsync/releases/download/1.0.2"
},
"repos": {
"common": [
{
"url": "https://${GIT_DOMAIN}/webmproject/libwebp.git",
"commit": "1fe3162541ab2f5ce69aca2e2b593fab60520d34",
"dir": "third_party/libwebp"
},
{
"url": "https://${GIT_DOMAIN}/libjpeg-turbo/libjpeg-turbo.git",
"commit": "129f0cb76346ceede8f4d8d87dea8acb0809056c",
"dir": "third_party/libjpeg-turbo"
},
{
"url": "https://${GIT_DOMAIN}/Tencent/tgfx.git",
"commit": "5948d72a0a5320a1ea055f23bc8312b07ab6d72c",
"dir": "third_party/tgfx"
}
]
},
"files": {
"common": [
{
"url": "${SKIA_ROOT}/include.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/include.zip",
"dir": "third_party/v8",
"unzip": "true"
}
],
"mac": [
{
"url": "${SKIA_ROOT}/darwin-x64.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/darwin-x64.zip",
"multipart": [
".001",
".002",
".003"
],
"dir": "third_party/v8",
"unzip": true
}
],
"win": [
{
"url": "${SKIA_ROOT}/win-ia32.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/win-ia32.zip",
"dir": "third_party/v8",
"unzip": true
}
]
},
"actions": {
"common": [
{
"command": "depsync --clean",
"dir": "third_party"
}
]
}
}
JavaScript
96.8%
Python
3.2%
Automatically synchronize the dependencies of a project by the DEPS configuration file
JavaScript
21
125 commits
updated Jun 25, 2026
A command line tool for automatically synchronizing the dependencies of a project by the DEPS configuration file.
The depsync tool provides a convenient way to download git repositories and files from the Internet, offering several key advantages over similar capabilities like git-submodules and git-lfs:
With all the advantages described above, all it takes is one straightforward command depsync. Execute it in the root of your main project, and you're good to go!
npm install depsync -g
Run the following command in the directory with a DEPS file:
depsync [platform] [options]
For example, if you want to synchronize the mac platform, run:
depsync mac
If you don't pass any platform parameter, it will automatically choose the host platform as the target platform. So the result of running depsync in macOS is the same to running depsync mac.
The available platform names are defined in the DEPS file, you can also define any other platform names as you want, such as ios, android... but only the mac, win and linux can be automatically chosen.
-h, --helpPrint help message with available options.
depsync --help
-v, --versionPrint the current version of depsync.
depsync --version
-p, --project <directory>Synchronize the project in the specified directory instead of the current directory.
depsync --project /path/to/your/project
depsync mac --project /usr/local/myproject
-c, --cleanClean the repos and files in current directory that do not exist in the DEPS file. This helps remove outdated dependencies.
depsync --clean
--non-recursiveSkip synchronizing the sub-projects. By default, depsync will recursively process DEPS files in all sub-repositories.
depsync --non-recursive
depsync mac --non-recursive
--mirror <mappings>Redirect repository and file URLs to mirror sources. This is particularly useful when:
Format: 'old_prefix->new_prefix' for single mapping, or 'old1->new1,old2->new2' for multiple mappings.
# Single mirror
depsync --mirror 'https://github.com/libpag/->https://gitee.com/pago/'
# Multiple mirrors (comma-separated)
depsync --mirror 'https://github.com/->https://gitee.com/,https://gitlab.com/->https://internal.company.com/'
The mirror option will replace URL prefixes for both repository URLs and file download URLs throughout the entire dependency tree.
Here is an example of DEPS file:
{
"version": "1.4.6",
"vars": {
"GIT_DOMAIN": "github.com",
"SKIA_ROOT": "https://github.com/domchen/depsync/releases/download/1.0.1",
"V8_ROOT": "https://github.com/domchen/depsync/releases/download/1.0.2"
},
"repos": {
"common": [
{
"url": "https://${GIT_DOMAIN}/webmproject/libwebp.git",
"commit": "1fe3162541ab2f5ce69aca2e2b593fab60520d34",
"dir": "third_party/libwebp"
},
{
"url": "https://${GIT_DOMAIN}/libjpeg-turbo/libjpeg-turbo.git",
"commit": "129f0cb76346ceede8f4d8d87dea8acb0809056c",
"dir": "third_party/libjpeg-turbo"
},
{
"url": "https://${GIT_DOMAIN}/Tencent/tgfx.git",
"commit": "5948d72a0a5320a1ea055f23bc8312b07ab6d72c",
"dir": "third_party/tgfx"
}
]
},
"files": {
"common": [
{
"url": "${SKIA_ROOT}/include.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/include.zip",
"dir": "third_party/v8",
"unzip": "true"
}
],
"mac": [
{
"url": "${SKIA_ROOT}/darwin-x64.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/darwin-x64.zip",
"multipart": [
".001",
".002",
".003"
],
"dir": "third_party/v8",
"unzip": true
}
],
"win": [
{
"url": "${SKIA_ROOT}/win-ia32.zip",
"dir": "third_party/skia",
"unzip": true
},
{
"url": "${V8_ROOT}/win-ia32.zip",
"dir": "third_party/v8",
"unzip": true
}
]
},
"actions": {
"common": [
{
"command": "depsync --clean",
"dir": "third_party"
}
]
}
}
JavaScript
96.8%
Python
3.2%