https://github.com/kabooboo/giphon
🦅 Download all projects in a Gitlab group or instance
https://github.com/kabooboo/giphon
cli clone gitlab groups projects
Last synced: about 1 month ago
JSON representation
🦅 Download all projects in a Gitlab group or instance
- Host: GitHub
- URL: https://github.com/kabooboo/giphon
- Owner: kabooboo
- License: apache-2.0
- Created: 2022-11-10T10:37:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-20T10:39:09.000Z (about 2 months ago)
- Last Synced: 2025-04-11T21:12:59.949Z (about 1 month ago)
- Topics: cli, clone, gitlab, groups, projects
- Language: Python
- Homepage:
- Size: 483 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

 [](https://pypi.org/project/black/) 
[](https://github.com/pypa/hatch)   ---
✨ Giphon is the contraction of 🦊 _Gitlab_ and 🫗 _siphon_. This CLI tools allows users
to recursively clone all projects in a given Gitlab group or instance.## Motivation
This project aims to provide a tool capable of replicating a Gitlab group's
structure into a directory structure.Locally cloned projects enable users to use familiar CLI tools such as `grep`
and `sed` directly into the projects' tree structure.## Demo

## Installation
To install `giphon`, simply run:
```sh
pip install --user giphon
```And if you wish to use giphon by simply calling `giphon`, you can set-up an
alias in your `.bashrc` (or other, if you have another shell):```sh
echo 'alias giphon="/usr/bin/env python3 -m giphon"' >> ~/.bashrc
```## Parameters
The `giphon` tool allows for the following parameters:
- **namespace** (CLI: `--namespace`): The Gitlab namespace to be cloned. `/`
defaults to the whole instance.
- **output** (CLI: `--output`): The target path to clone the repositories to.
- **gitlab_token**: (CLI: `--gitlab-token`, env: `GITLAB_TOKEN`): The Personal
Access Token authenticating the user.
- **gitlab_url**: (CLI: `--gitlab-url`, env: `GITLAB_URL`): The URL of the Gitlab
instance to clone the repositories from. Defaults to `"https://gitlab.com"`
- **fetch_repositories**: (CLI: `--fetch-repositories`/`--no-fetch-repositories`):
Whether to fetch remotes on repositories that already exist.
- **save_ci_variables**: (CLI: `--save-ci-variables`/`--no-save-ci-variables`):
Whether to download CI/CD variables to a .env directory.
- **clone_archived** (CLI: `--clone-archived`/`--no-clone-archived`): Whether
to also clone archived repository.
- **clone_through_ssh**: (CLI: `--clone-through-ssh`/`--no-clone-through-ssh`):
Whether to use the SSH protocol or the HTTPS protocol to clone the git
repositories
- **gitlab_username** (CLI: `--gitlab-username`, env: `GITLAB_USERNAME`): The
username to use, when cloning through HTTPS.
- **verbose**: (CLI: `--verbose`/`-v`): The level of verbosity## Running programmatically
You can import the main function from `giphon` as such:
```python
from pathlib import Pathfrom giphon.siphon import siphon
siphon(
namespace=Path("my-namespace"),
output=Path("~/Projects"),
gitlab_token="",
gitlab_url="https://gitlab.com",
fetch_repositories=True,
save_ci_variables=False,
clone_archived=False,
verbose=False,
)
```The function takes as inputs the same parameters from the CLI tool.
---
Logo is © from [**Midjourney**](https://midjourney.com)