CLI to clone repositories from different git hosts
  • Rust 83.1%
  • Nix 16.9%
Find a file
2025-12-21 14:24:27 +01:00
nix fix(nix): correct function usage 2025-12-21 14:24:27 +01:00
src feat(clone): show git clone progress 2025-11-02 12:52:24 +01:00
.dep v3.0.0 2024-11-20 20:43:24 +00:00
.envrc chore: added .envrc to always use devshell 2025-03-17 17:00:56 +01:00
.gitignore chore: do not track .direnv 2025-03-17 17:06:04 +01:00
Cargo.lock chore: v4.2.0 2025-11-02 12:55:41 +01:00
Cargo.toml chore: v4.2.0 2025-11-02 12:55:41 +01:00
flake.lock feat(nix): switch to nix-rust & create homeManager module 2025-12-21 13:38:51 +01:00
flake.nix feat(nix): switch to nix-rust & create homeManager module 2025-12-21 13:38:51 +01:00
README.md v3.0.0 2024-11-20 20:43:24 +00:00

Gull

A simple CLI to clone git repositories from diffrent domains.

gull originally stands for git pull and it was to late when i found out this makes no sense.

Motivation

The first version was used to fasten git cloning for me as all my repos were on gitlab.sk13.xyz/tt14 and this was a lot to type.

Today I have repos across multiple domains all with diffrent usernames / emails. gull is aimed simplify the setup process for all this domains.

Usage

Overview of all commands.

This might not be up to date. Use gull help for a better overview of commands and usage information.

Add domain

$ gull add NAME --url DOMAIN --name USER --mail E-MAIL

This will add a domain with a specific username and email only for this domain. When cloning a repo from this domain with gull, the given username and email will be set to the local git config.

List domains

$ gull ls

This will list all known domains with username and emails.

Remove domain

$ gull rm DOMAIN

This will remove the doamin from the known domain list.

Clone repo

$ gull clone REMOTE LOCAL

This will clone a git repository.

The command accepts between 1 and 2 arguments. These will be used to determin from where to clone and where to local clone should be placed.

Remote Repo

If the remote location starts with https:// the URL will be taken as-is and passed to git clone. A missing .git at the end will not be appanded.

Afterwards domain specified after https:// will be used to match agains known domains (the url part). If a known domain is found, the local username & email will be set, otherwise a warning will be shown.

If the remote location does not start with https:// the domain will be made up of parts:

  1. domain (the name part)
  2. namespace
  3. project

The location follows these rules:

  • parts are splitted by a /
  • if the last part does not have a .git at the end it will be appanded
  • if only 2 parts are specified:
    • layout is considered DOMAIN/PROJECT
    • namespace will be autofilled to the username of the domain

If the domain is not known, the cli will error. If it is found the local username & email will be set.

Examples

Given domains:

  • gitlab
    • url: gitlab.sk13.xyz
    • user: tt14
    • email: tt14@example.com
  • gta
    • url: git.solarpunk.social
    • user: krauterbaquette
    • email: krauterbaquette@example.com
$ gull clone gitlab/gull
> git clone gitlab.sk13.xyz/tt14/gull.git
> git config --local user.name tt14
> git config --local user.email tt14@example.com
gull clone gta/GTA-HEG/SAC
> git clone git.solarpunk.social/GTA-HEG/SAC.git
> git config --local user.name krauterbaquette
> git config --local .user.email krauterbaquette@example.com

Local Repo

The local location can be specified by a second argument. It behaives exactly the same as the second argument to git clone.

$ gull clone REMOTE local

Will clone the REMOTE repo to {CWD}/local.