GitLab OG Image Generator
Open Graph images for your Gitlab repositories.
A CLI tool to generate Open Graph images for GitLab entities.
✨ Features
- Subcommand-based CLI (
gogg repo ...) for extensibility - Fetches repository metadata from the GitLab API (stars, forks, issues, contributors, languages)
- Generates styled OG images with project name, description, and metrics
- Supports custom icons (URL or local file path)
- Configurable metric visibility (contributors, issues, stars, forks)
- Output formats: PNG, JPG, WebP
- Language color bar based on repository language breakdown
📋 Requirements
- Python 3.11 or higher
📦 Installation
Using pip
pip install gitlab-og-image-generator
Using uv
uv add gitlab-og-image-generator
🚀 Usage
Repository OG Image
Generate an OG image for a public repository:
gogg repo my-project --group my-group
With a personal access token for private repositories:
gogg repo my-project --group my-group/subgroup --pat glpat-xxxx
Customize the output:
gogg repo my-project --group my-group \
--headline "My Organization" \
--description "A custom description for the OG image" \
--icon ./logo.png \
--format png \
--output my-image.png \
--no-contributors \
--no-issues
Options
Shared Options (available on all subcommands)
| Option | Description |
|---|---|
--headline |
Headline text (default: group path from API) |
--description |
Description text (default: entity description from API) |
--icon |
Custom icon URL or local file path |
--pat |
Personal access token for private repositories |
--format |
Image format: png, jpg, webp (default: inferred from --output, or jpg) |
--output |
Output file path |
Repo Subcommand Options
| Option | Description |
|---|---|
--group |
Repository group including subgroups (required) |
--no-contributors |
Hide contributors count |
--no-issues |
Hide issues count |
--no-stars |
Hide stars count |
--no-forks |
Hide forks count |
🛠️ Development
Check out our Contribution Guide for details on setting up your development environment, running tests, and submitting pull requests.
The project uses uv for dependency management, ruff for linting, and tox
for multi-environment testing.
📜 Changelog
See the CHANGELOG.md for a history of changes.
👥 Contributors
See our list of contributors.
📄 License
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
Release files for gogg 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gogg-0.2.0.tar.gz | 429.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gogg-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 859.3 kB
Release files / gogg-0.2.0.tar.gz
| Download URL | gogg-0.2.0.tar.gz |
|---|---|
| Size | 429.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35800744eefc8d5e7fd7bc05dcd544e987b67509e42baec548468700c94384ca
|
|
BLAKE2b-256 checksum How to use checksums |
7743cde5ea7086ae495522b0fb5a862711f3a731a9ed6e1eaf65e5e07329c429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gogg-0.2.0-py3-none-any.whl
| Download URL | gogg-0.2.0-py3-none-any.whl |
|---|---|
| Size | 430.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbb983ab77bcea19807115ed2b847aaf8534c668914b13b4e2cfc40eb47d99b4
|
|
BLAKE2b-256 checksum How to use checksums |
4297a81ce2c20eb2d4bebff59dfddc38444436c98bd18f895ab47a2d63f3f79b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|