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-1.0.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for gitlab_download_packages-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e84a8ee0e5d07d0dc58b2fcf2d422e636b361112abbfe41fea8811c09a65c01c
MD5 955d0bebef43ee100ffbee51db81c49b
BLAKE2b-256 275edaa54d0aa07813af3572ca6d1daf957144e9731ddd8bb6acc108aa24a895

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