forgejo-sync-manager-cli v1.0.3

CLI tool for batch synchronization of Forgejo repositories

Automatic authentication, progress tracking, and update detection.

Python CLI Forgejo Repository Manager

forgejo-sync-manager-cli — CLI tool for batch synchronization of Forgejo repositories to local machine.

Automatic authentication via personal access token, repository cloning and updating with progress tracking, update detection via commit hash comparison, and full repository recloning option.

  • Automatic Authentication — via personal access token
  • Repository Cloning & Updating — with progress tracking
  • Update Detection — via commit hash comparison
  • Full Recloning — option to delete and fresh clone
  • Parallel Progress Display — for large repository sets
  • Persistent Configuration — stored locally

Requirements: Python 3.8+, Git, Forgejo server with API access

git clone https://github.com/smartlegionlab/forgejo-sync-manager-cli.git
cd forgejo-sync-manager-cli
python -m venv venv
source venv/bin/activate
python app.py

On first run, the tool will guide you through:

  1. Server URL (e.g., http://localhost:3000)
  2. Personal access token with read:repository and read:user scopes

Configuration is stored in ~/forgejo-sync-manager/config.json

Main Menu:

OptionDescription
1Display user information
2Repository operations
3Settings (full reset)
4About (author, repository, license, disclaimer)
0Exit

Repository Menu:

OptionDescription
1Show statistics (total, public, private, forks)
2List all repositories with names, types, and sizes
3Check for updates (compares local and remote commit hashes)
4Sync all repositories (clone missing, pull existing)
5Reclone all repositories (delete and fresh clone)
0Back to main menu

  • Authentication — Token-based authentication via Forgejo API
  • Repository Discovery — Fetches complete repository list with pagination (50 per page)
  • Update Detection — Executes git fetch and compares HEAD with FETCH_HEAD
  • Sync Operations — Uses authenticated URLs with embedded token for Git operations
  • Directory Structure~/forgejo-sync-manager/{username}/repositories/

This application is built on top of:

LibraryDescriptionVersion
forgejo-sync-manager-coreUniversal core library for Forgejo repository synchronizationv1.0.0
requestsHTTP library for Python≥2.31.0

Related Projects:

By using this software, you agree to the full disclaimer terms.

Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md

License: BSD 3-Clause License