A modern, feature-rich desktop application for efficiently managing your GitHub stars. Built with PySide6 (Qt6) and optimized for handling thousands of starred repositories with a sleek dark-themed UI.
Features β’ Installation β’ Usage β’ API Details β’ Contributing
- Dark Theme Design: Custom QSS stylesheet with a sleek, professional dark aesthetic
- Responsive & Intuitive: Clean layout with organized tabs and sections
- High Performance: Handles 5000+ starred repositories without lag or stuttering
- Asynchronous Design: Background workers via
QThreadwithSignalsandSlotskeep the UI responsive - Live Search & Filter: Instantaneous full-text search by name, owner, description, or topics
- Smart Filtering: Filter by Language, Archived status, and Fork status simultaneously
- Multiple Sort Options: Sort by Repository Name, Owner, Language, or Last Updated date
- Batch Operations: Select multiple repositories and perform actions en masse
- Secure Token Connection: Connect with GitHub Personal Access Token (PAT)
- Optional Local Storage: Safely store credentials locally (encrypted option available)
- No Browser Automation: Uses official GitHub REST API exclusivelyβno Selenium or web scraping
- Native Checkboxes:
β/βfor intuitive multi-select operations - Quick Actions:
- Select All / Deselect All / Invert Selection
- Right-click context menu (Open Repository, Copy URL, Open Owner Profile)
- Double-click to open repository directly in browser
- Real-time Updates: Immediate feedback on all operations
- Interactive Progress Bar: Live estimated completion times and real-time counters
- Cancellation Controls: Stop operations at any time
- Console Log Output: Timestamped operation logs in a clean, scrollable code-font window
- Error Handling: Detailed logging of failures and retry attempts
- Export Formats: Save your starred repositories to CSV or JSON
- Import Backups: Load JSON backups to compare with current account status
- Smart Re-starring: Automatically re-star missing repositories from backups
- Data Integrity: Verify and sync your local backups with live GitHub data
- One-Click Cleanup: Clear settings, credentials, and cache folders
- Configuration Reset: Easily reset all app preferences and tokens
- Data Wipe: Securely remove sensitive information
- Python: Version 3.11 or higher
- GitHub Account: With a Personal Access Token (PAT)
- PAT Scopes:
public_repoβ for managing public repository starsrepoβ for managing both public and private repository stars
git clone https://github.com/yourusername/github-stars-manager.git
cd github-stars-managerInstall all required packages in one command:
pip install -r requirements.txtOr manually install:
pip install PySide6 requests python-dotenv- Go to GitHub Settings β Developer Settings β Personal Access Tokens
- Click "Generate new token (classic)"
- Select scopes:
public_repo(orrepofor private repos) - Copy the token and keep it safe
python main.pyTo wipe all saved tokens, config, and cache:
python clear_data.py- Launch the application
- Paste your GitHub Personal Access Token
- Click "Connect" to authenticate
- Your starred repositories load automatically
- Search Bar: Type to filter by repository name, owner, or description in real-time
- Language Filter: Select a programming language to show only those repositories
- Status Filters: Toggle "Archived" and "Forks" visibility
- Sorting: Click column headers to sort by different criteria
- Select repositories using checkboxes
- Use batch actions:
- Remove stars from selected repos
- Export selected repos to CSV/JSON
- Open all in browser (opens owner profile)
- Monitor progress with the live progress bar
Right-click any repository to:
- π Open Repository β Opens in default browser
- π Copy URL β Copies repo URL to clipboard
- π€ Open Owner Profile β Opens owner's GitHub profile
- Select repositories (or select all)
- Click "Export"
- Choose format: CSV or JSON
- File saves to your specified location
- Click "Import"
- Select a previously exported JSON file
- App compares with current starred repos
- Review differences and confirm
- Auto-star missing repositories
The application uses the official GitHub REST API exclusively. No browser automation, Selenium, or scraping is involved.
GET https://api.github.com/user
Authorization: Bearer <TOKEN>
- Purpose: Authenticates the token and retrieves the logged-in username
- Response: User profile information
GET https://api.github.com/user/starred?per_page=100&page=<n>
Accept: application/vnd.github.star+json
Authorization: Bearer <TOKEN>
- Purpose: Retrieves paginated list of all starred repositories
- Parameters:
per_page: 100 (maximum per-page limit for efficiency)page: Incremented to fetch all pages
- Special Header: Custom
Acceptheader pullsstarred_attimestamps
DELETE https://api.github.com/user/starred/{owner}/{repo}
Authorization: Bearer <TOKEN>
- Purpose: Unstar a specific repository
- Response: 204 No Content on success
PUT https://api.github.com/user/starred/{owner}/{repo}
Authorization: Bearer <TOKEN>
- Purpose: Star a repository (used for re-starring imported repos)
- Response: 204 No Content on success
- Monitoring: Tracks
X-RateLimit-RemainingandX-RateLimit-Resetheaders - Auto-Pause: When remaining quota reaches 0, automatically pauses operations
- Smart Resume: Calculates exact sleep duration and resumes automatically
- 403 Handling: Detects HTTP 403 rate limits
- Retry Strategy: Extracts
Retry-Afterheader and waits specified duration - Prevention: Implements exponential backoff to avoid repeated throttling
- Transient Failures: Automatically retries up to 3 times for network issues
- Detailed Logging: All retry attempts logged to console with timestamps
- Graceful Skipping: Failures after max retries are logged and skipped
Each starred repository stores the following fields:
| Field | Type | Description |
|---|---|---|
id |
Integer | Unique Repository ID |
name |
String | Repository name |
owner |
String | Owner's GitHub login |
description |
String | Repository description (nullable) |
language |
String | Main programming language |
topics |
Array | Keywords/tags associated with repo |
fork |
Boolean | Whether repo is a fork |
archived |
Boolean | Whether project is archived |
private |
Boolean | Public/Private visibility |
created_at |
Timestamp | Repository creation date |
updated_at |
Timestamp | Last update timestamp |
html_url |
String | Repository web URL |
default_branch |
String | Primary branch name (e.g., main) |
avatar_url |
String | Owner's profile picture URL |
starred_at |
Timestamp | When you starred it |
github-stars-manager/
βββ main.py # Entry point for the Qt application
βββ gui.py # PySide6 UI, stylesheets, and worker management
βββ api.py # GitHub REST API integration & rate limiting
βββ models.py # Repository dataclass definition
βββ utils.py # File I/O (CSV/JSON) & comparison utilities
βββ config.py # Configuration & preference management
βββ clear_data.py # Data cleanup & reset utility
βββ requirements.txt # Python dependencies
βββ README.md # This file
main.py: Application entry point; initializes the Qt event loop and main windowgui.py: Manages all UI components, QSS styling, context menus, and launches background workers to prevent blockingapi.py: Handles GitHub API requests, pagination, rate throttling, and error recoverymodels.py: Defines theRepositorydataclass for type-safe data handlingutils.py: Provides utility functions for JSON/CSV export, import, and data comparisonconfig.py: Manages local configuration (config.json), window state, and preferencesclear_data.py: One-click tool to reset all configurations and wipe stored secrets
# Clone repo
git clone https://github.com/yourusername/github-stars-manager.git
cd github-stars-manager
# Create virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run application
python main.py- Follow PEP 8 guidelines
- Use type hints where applicable
- Keep functions focused and modular
- Document complex logic with docstrings
This project is licensed under the MIT License β see the LICENSE file for details.
Contributions are welcome! To get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- π Bug fixes β Report and fix issues
- β¨ Features β Suggest new functionality
- π Documentation β Improve guides and comments
- π¨ UI/UX β Enhance design and usability
- β‘ Performance β Optimize code and speed
Q: Is my GitHub token stored securely?
A: By default, tokens are stored in text in config.json locally in your system. So there are no external threats.
Q: Can I use this with GitHub Enterprise? A: Currently, the app is designed for GitHub.com. Enterprise support can be added with minor modifications.
Q: What if I reach the API rate limit? A: The app automatically detects rate limits and pauses operations. It resumes automatically once the limit resets.
Q: How long does it take to export 5000+ stars? A: Initial fetch takes ~2-3 minutes depending on your connection. Exports are instantaneous.
Q: Can I remove all my stars at once? A: Yes! Use "Select All" and then "Remove Stars" to batch unstar repositories. Progress will be shown in real-time.
- π Report Issues: GitHub Issues
- π‘ Feature Requests: Open an issue with the
enhancementlabel - π§ Contact: [Your email or contact info]
- Built with PySide6 β Python bindings for Qt6
- Powered by GitHub REST API
- Inspired by the need for better GitHub stars management
Made with β€οΈ by [Your Name/Team]
