#git #platform #git-repository #gitea #github #authentication #gitlab #wich

grp-core

A simple tool to mannage platforms for git repositories

2 releases

Uses new Rust 2024

new 0.1.1 Feb 10, 2026
0.1.0 Jan 27, 2026

#5 in #gitea


Used in girep

GPL-3.0-only

105KB
2K SLoC

grp-core

is a library that contains the abstracted logic to interact with the most used platforms for git repositories for know it supports github, gitlab, gitea, forgejo and codeberg

How it works?

grp-core expose an Enum called Platform witch allows you to deside wich platform to interact with, it also provides a self matching method to create the enum based on a configuration.

Example 1

create a github interactive platform (only allows you to interact with github)

use grp_core::Platform;

let platform = Platform::Github;

Example 2

create an interactive platform based on a &str parameter, this allows you to create one logic for any platform and just change the &str to change the platform you will interact with.

use grp_core::Platform;

let platform = Platform::matches("github");

assert!(platform.unwrap() == Platform::Github);

Configuration

grp-core expose an struct called Config, wich contains the basic information to connect and authenticate to the platform and its needed almost in every interaction method.

a feature rich example can be found at https://github.com/feraxhp/grp


grp-core

This library is meant to help interacting with a unique interface for the API of difrent git platforms, it abstracts the internal use of every (supported) platform api and creates and interface to interact with them.

suported platforms

  • GitHub
  • Gitea
  • Codeberg
  • Forgejo
  • GitLab

Suported actions

Repositories

  • List
  • Create
  • Delete

Organizations

  • List
  • Create (github and gitea could reject the creation, depending on the internal api politics)
  • Delete

Authentication

  • token authentication

Aditional

You can also generate custom requests for every platform, and the authentication will be automaticly mannaged for you.

examples

See: feraxhp/grp to a full feature example of these implementations.

Dependencies

~9–26MB
~298K SLoC