Git Federation Searcher
Search across multiple self-hosted Git instances in parallel.
Overview
This tool searches across various Git hosting platforms (not just GitHub/GitLab) including:
- - Codeberg
- Gitea.com
- NotABug
- Gitdab
- Self-hosted instances
Features
- - Multi-Instance Search: Search 5+ instances at once
- Auto-Discovery: Detects if instances are reachable
- Add Custom Instances: Add your own Gitea/GitLab instances
- Fallback to Web: Uses SearXNG if API search fails
- Type Detection: Auto-detects Gitea vs GitLab vs Forgejo
- Results by Stars: Sorted by popularity
Default Instances
| Instance | Type | URL |
|---|
| Codeberg | Gitea | https://codeberg.org |
| Gitea.com |
Gitea | https://gitea.com |
| OpenDev | Gitea | https://opendev.org |
| NotABug | Gogs | https://notabug.org |
| Gitdab | Forgejo | https://gitdab.com |
Usage
Command Line
CODEBLOCK0
Telegram Bot
CODEBLOCK1
Supported Git Types
| Type | API | Notes |
|---|
| Gitea | ✅ Full | Best support |
| Forgejo |
✅ Full | Gitea fork, same API |
| GitLab | ✅ Full | Uses v4 API |
| Gogs | ✅ Partial | Basic search only |
Requirements
- - Python 3.7+
- curl (for API calls)
- (Optional) SearXNG for web fallback
Git Federation Searcher
跨多个自托管Git实例并行搜索。
概述
该工具可搜索多种Git托管平台(不仅限于GitHub/GitLab),包括:
- - Codeberg
- Gitea.com
- NotABug
- Gitdab
- 自托管实例
功能特性
- - 多实例搜索:同时搜索5个以上实例
- 自动发现:检测实例是否可达
- 添加自定义实例:添加自己的Gitea/GitLab实例
- Web回退:API搜索失败时使用SearXNG
- 类型检测:自动识别Gitea、GitLab或Forgejo
- 按星标排序:按流行度排序结果
默认实例
| 实例 | 类型 | URL |
|---|
| Codeberg | Gitea | https://codeberg.org |
| Gitea.com |
Gitea | https://gitea.com |
| OpenDev | Gitea | https://opendev.org |
| NotABug | Gogs | https://notabug.org |
| Gitdab | Forgejo | https://gitdab.com |
使用方法
命令行
bash
搜索所有实例
python3 git
federationsearcher.py whisper
列出已配置的实例
python3 git
federationsearcher.py --list
添加自定义实例
python3 git
federationsearcher.py --add MyGitea https://git.example.com gitea
移除实例
python3 git
federationsearcher.py --remove MyGitea
Telegram机器人
/gitsearch whisper # 搜索所有实例
/gitinstances # 列出所有已配置的实例
/gitadd Name URL Type # 添加自定义实例
支持的Git类型
| 类型 | API | 备注 |
|---|
| Gitea | ✅ 完整 | 最佳支持 |
| Forgejo |
✅ 完整 | Gitea分支,相同API |
| GitLab | ✅ 完整 | 使用v4 API |
| Gogs | ✅ 部分 | 仅基础搜索 |
系统要求
- - Python 3.7+
- curl(用于API调用)
- (可选)用于Web回退的SearXNG