Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

GitLab OG Image Generator

Open Graph images for your Gitlab repositories.

Community-Project

A CLI tool to generate Open Graph images for GitLab entities.

✨ Features

📋 Requirements

📦 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)

OptionDescription
--headlineHeadline text (default: group path from API)
--descriptionDescription text (default: entity description from API)
--iconCustom icon URL or local file path
--patPersonal access token for private repositories
--formatImage format: png, jpg, webp (default: inferred from --output, or jpg)
--outputOutput file path

Repo Subcommand Options

OptionDescription
--groupRepository group including subgroups (required)
--no-contributorsHide contributors count
--no-issuesHide issues count
--no-starsHide stars count
--no-forksHide 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.