Metadata-Version: 2.4
Name: cal-gitlab-packages
Version: 1.0.0b1
Summary: Download and upload package files for GitLab projects and groups
Project-URL: Repository, https://gitlab.com/cyberassessmentlabs/private/tools/cal-gitlab-packages
Author: Cyber Assessment Labs
License-Expression: MIT
License-File: LICENSE
Keywords: download,gitlab,packages,registry,upload
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Build Tools
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# cal-gitlab-packages

Download and upload package files for GitLab projects and groups.

## Installation

```bash
pip install cal-gitlab-packages
```

## Usage

```bash
# Download package files from a group
cal-gitlab-packages download -u https://gitlab.com -p myorg/public -o ./packages

# Upload package files to a target GitLab
cal-gitlab-packages upload -u https://gitlab.example.com -p target-group -i ./packages -t TOKEN
```

## Commands

### download

Download package files from GitLab package registries. Supports version filtering, package type filtering, manifest-based incremental downloads, and parallel threads.

Use `--flat` to download all files into a single directory (useful for manual inspection). Note that flat output cannot be used with the `upload` command, which requires the `project/package/version` directory structure.

### upload

Upload package files to GitLab via the generic package registry. Reads the same directory structure produced by `download` and uploads files to the target instance.

## Configuration

Settings can be provided via CLI args, environment variables, or a config file at `~/.config/cal-gitlab-packages/config.json`:

```json
{
    "gitlab_url": "https://gitlab.example.com",
    "token": "glpat-xxxxxxxxxxxx",
    "base_group": "myorg",
    "output": "./downloads",
    "version_filter": "release",
    "parallel": 32
}
```

## Licence

MIT License — Copyright (c) 2026 Cyber Assessment Labs
