A powerful Python package to detect duplicate and similar repositories on GitHub. Analyze ecosystem fragmentation, find abandoned forks, and identify alternative implementations.
✅ Find Similar Repositories - Detect repositories solving similar problems ✅ Duplicate Detection - Identify nearly identical repositories ✅ Ecosystem Analysis - Analyze topic fragmentation across GitHub ✅ Fork Detection - Find abandoned or active forks ✅ Intelligent Matching - Multi-factor similarity algorithm ✅ Rate Limit Handling - Built-in rate limit management ✅ Semantic Analysis - Optional deep learning-based description matching ✅ Caching - Efficient caching to reduce API calls ✅ High Performance - Concurrent API requests with retry logic ✅ Security - Input validation and secure token handling
pip install repo-duplicate-detectorfrom repo_duplicate_detector import RepoMatcher
# Initialize
matcher = RepoMatcher(github_token="your_github_token")
# Find similar repositories
similar_repos = matcher.find_similar_repos("facebook/react")
for match in similar_repos:
print(f"{match.repo2['full_name']}: {match.similarity.overall_score:.2%}")Set your GitHub token as environment variable:
export GITHUB_TOKEN="ghp_your_token_here"Or pass it directly:
from repo_duplicate_detector import RepoMatcher
from repo_duplicate_detector.config import Config
config = Config(github_token="ghp_your_token")
matcher = RepoMatcher(config=config)Main class for finding duplicates and analyzing repositories.
find_similar_repos(repo, language=None, threshold=None, max_results=None)
Find repositories similar to a given repository.
matches = matcher.find_similar_repos(
repo="facebook/react",
language="javascript",
threshold=0.7,
max_results=20
)
for match in matches:
print(match)
print(match.to_dict())find_duplicates_in_list(repos, threshold=None)
Find duplicates within a list of repositories.
duplicates = matcher.find_duplicates_in_list- Github
- CoPilot
- ChatGPT
- Visual Studio
- Github Dev
- Claude