Skip to main content

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 --overwrite to 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlab_download_packages-0.5.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_download_packages-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_download_packages-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba5a0429b4fc4b292f649ff04a53a68412bcf9f297e823258692e59c0175fc9
MD5 6636a582b6fdad41de3d489493cfe380
BLAKE2b-256 f7a09354f5f8d5dc75a397091317ac3c952dad3465cd4078e70775655d4f905f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page