gitlab-generic
A command-line tool for managing files in GitLab's Generic Package Registry.
GitLab provides a built-in Generic Package Registry for hosting arbitrary files (tarballs, binaries, zips, etc.), but the web UI for browsing and managing packages is limited. gitlab-generic gives you a fast, readable CLI for listing packages, inspecting versions, and downloading or uploading files — all via the GitLab REST API.
Features
- List packages — see all packages at a glance, with version counts and latest stable version
- Show versions — view all versions for one or more packages, with file details and pre-release filtering
- Download — fetch files from the registry by package name and version
- Upload — publish files with auto-detected or explicit package name and version
- Delete — remove a package version from the registry
- Multiple output formats — coloured tables (default),
--plainfor scripting, or--jsonfor machine-readable output
Zero external dependencies — uses only the Python 3.12+ standard library.
Installation
pip install gitlab-generic
Configuration
Create a config file at ~/.config/gitlab-generic/config.json:
{
"url": "https://gitlab.com",
"project": "my-group/my-project",
"token": "glpat-xxxxxxxxxxxx"
}
Or pass these as CLI flags (--url, --project, --token) on each command.
Usage
# List all packages in the registry
gitlab-generic list
# Show versions for a package (stable only by default)
gitlab-generic show my-package
# Show all versions including pre-releases
gitlab-generic show my-package --all
# Plain output for scripting
gitlab-generic show my-package --plain
# Download the latest stable version's files
gitlab-generic download my-package
# Download a specific version
gitlab-generic download my-package==1.2.3
# Download all versions of a package
gitlab-generic download my-package --all
# Upload files (name and version auto-detected from filenames)
gitlab-generic upload calrep-0.29.0-*.tar.gz
# Upload with explicit name and version
gitlab-generic upload dist/app.tar.gz --name my-package --version 1.0.0
# Delete a specific version
gitlab-generic delete my-package==1.0.0
Development
make dev # Create dev environment
make check # Run ruff + pyright
make format # Auto-fix and format code
make build # Build wheel + docs
make docs # Build HTML documentation
Licence
MIT License — Copyright (c) 2026 Cyber Assessment Labs
Metadata
Release files for gitlab-generic 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitlab_generic-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gitlab_generic-1.0.0-py3-none-any.whl
| Download URL | gitlab_generic-1.0.0-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a79f3945fb9730469b8ffde7dbc0171430c38c846844ccb97c19ddc54641257b
|
|
BLAKE2b-256 checksum How to use checksums |
442fde69decb356a1a253cd3245d235c01f667fc2ca9fb4f660c7d957fcd063f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|