Download all packages from a GitLab project's package registry
Project description
gitlab-download-packages
Download all packages from a GitLab project's package registry.
Features
- Downloads all packages from a GitLab project's package registry
- Supports PyPI and generic package types only
- Works with public registries (no authentication required)
- Organises downloads by package type and name
- Skips existing files (use
--overwriteto re-download) - Python 3.12+ with zero external dependencies
Supported Package Types
This tool only supports downloading:
- PyPI packages (
--type pypi) - Generic packages (
--type generic)
Other GitLab package types (Maven, npm, NuGet, etc.) are not supported.
Installation
pip install gitlab-download-packages
Or install from source:
git clone https://gitlab.com/cyberassessmentlabs/public/tools/gitlab-download-packages.git
cd gitlab-download-packages
pip install .
Usage
# Download all packages (PyPI and generic)
gitlab-download-packages \
--gitlab-url https://gitlab.com \
--project mygroup/myproject \
--output ./packages
# Download only PyPI packages
gitlab-download-packages -u https://gitlab.com -p mygroup/myproject -o ./packages -t pypi
# Download only generic packages
gitlab-download-packages -u https://gitlab.com -p mygroup/myproject -o ./packages -t generic
# Overwrite existing files
gitlab-download-packages -u https://gitlab.com -p mygroup/myproject -o ./packages -f
Options
| Option | Short | Description |
|---|---|---|
--gitlab-url |
-u |
GitLab instance URL (required) |
--project |
-p |
Project path (e.g., group/project) (required) |
--output |
-o |
Output directory for downloaded packages (required) |
--type |
-t |
Package type: pypi or generic (default: both) |
--package |
-n |
Package name to download (exact match, can repeat) |
--release-only |
-r |
Only download release versions (x.y.z format) |
--overwrite |
-f |
Overwrite existing files instead of skipping |
--verbose |
-v |
Verbose output (use twice for debug) |
--no-colour |
Disable coloured output | |
--help |
-h |
Show help message |
--version |
Show version |
Output Structure
Downloads are organised by package type and name:
packages/
├── pypi/
│ └── package-name/
│ ├── package_name-1.0.0.tar.gz
│ └── package_name-1.0.0-py3-none-any.whl
└── generic/
└── artifact-name/
└── artifact-name-1.0.0.zip
Requirements
- Python 3.12 or higher
- No external dependencies (uses only Python standard library)
Development
# Set up development environment
make dev
# Run linting and type checks
make check
# Format code
make format
# Build package and documentation
make build
Licence
MIT License — Copyright (c) 2026 Cyber Assessment Labs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlab_download_packages-0.5.1-py3-none-any.whl.
File metadata
- Download URL: gitlab_download_packages-0.5.1-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2d29f974dbb51dd8e2beac1f7681731a3faae4ec4a937e275cae8ba1e9e740
|
|
| MD5 |
8d25ee6ee30cdadc9b124d0650421474
|
|
| BLAKE2b-256 |
59d824a3c279c340e7fedecfe5f720dfb494081b4c807473819bb7b2eecf56e5
|