Forgejo Sync Manager CLI
CLI tool for batch synchronization of Forgejo repositories
Command-line tool for batch synchronization of Forgejo repositories to local machine. Token authentication, update detection, progress tracking.
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:
- Server URL (e.g.,
http://localhost:3000) - Personal access token with
read:repositoryandread:userscopes
Configuration is stored in ~/forgejo-sync-manager/config.json
Main Menu:
| Option | Description |
|---|---|
1 | Display user information |
2 | Repository operations |
3 | Settings (full reset) |
4 | About (author, repository, license, disclaimer) |
0 | Exit |
Repository Menu:
| Option | Description |
|---|---|
1 | Show statistics (total, public, private, forks) |
2 | List all repositories with names, types, and sizes |
3 | Check for updates (compares local and remote commit hashes) |
4 | Sync all repositories (clone missing, pull existing) |
5 | Reclone all repositories (delete and fresh clone) |
0 | Back 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 fetchand comparesHEADwithFETCH_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:
| Library | Description | Version |
|---|---|---|
| forgejo-sync-manager-core | Universal core library for Forgejo repository synchronization | v1.0.0 |
| requests | HTTP library for Python | ≥2.31.0 |
Related Projects:
- forgejo-sync-manager-gui — Desktop GUI application with dark theme
- forgejo-sync-manager-core — Universal core library
- Language: Python 3.8+
- Core Library: forgejo-sync-manager-core
- HTTP: requests
- Platform: Linux / macOS / Windows
- License: BSD 3-Clause
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