A Chrome extension that enables seamless upload of Bolt.new projects directly to GitHub repositories. Bridge the gap between rapid prototyping in Bolt.new and professional version control with GitHub.
Upload your entire Bolt.new project to GitHub with just a few clicks. No manual file handling required.
Authenticate securely using GitHub Personal Access Tokens with proper scope validation and local storage.
- Intelligent change detection between local and remote files
- Selective upload of only modified, new, or deleted files
- File categorization and preview before upload.
- Support for clearing existing repository contents.
- Select target branch for uploads
- Automatic branch creation if needed
- Support for all existing repository branches
- Browse and search through your GitHub repositories
- Create new repositories directly from the extension
- Real-time repository information and statistics
- Custom commit messages with character count guidance
- Detailed file change summaries
- Progress tracking for upload operations
Coming soon - the extension will be available on the Chrome Web Store
- Clone or download this repository
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension directory
- The GitHub Bridge icon will appear in your Chrome toolbar
- Go to GitHub Settings > Personal Access Tokens
- Click "Generate new token (classic)"
- Give your token a descriptive name (e.g., "GitHub Bridge Extension")
- Select the following scopes:
repo- Full repository accessuser:email- Access to user email
- Click "Generate token" and copy the token immediately
- Important: Save this token securely as GitHub won't show it again
- Click the GitHub Bridge extension icon in Chrome
- Enter your GitHub Personal Access Token
- Click "Authenticate" to validate and store the token
- Export from Bolt.new: Export your project as a ZIP file from Bolt.new
- Select Repository: Choose an existing repository or create a new one
- Upload Files: Drag and drop or browse for your ZIP file
- Review Changes: Preview file changes and configure commit settings
- Push to GitHub: Complete the upload with a custom commit message
- Frontend: Vanilla JavaScript with modern ES6+ features
- Backend: Chrome Extension Service Worker (Manifest V3)
- Styling: Custom CSS with design system and CSS variables
- File Processing: JSZip library for ZIP file handling
- API Integration: GitHub REST API v3
Handles all GitHub API interactions including:
- Token validation and user authentication
- Repository CRUD operations
- Branch management and Git operations
- File upload and commit creation
- Tree traversal and blob content retrieval
- Screen-based navigation system
- Form validation and error handling
- Progress tracking and user feedback
- Responsive design for popup constraints
- ZIP file validation and extraction
- File content analysis and encoding
- Change detection against remote repository
- Selective upload optimization
- Git tree and commit creation
- Content Security Policy: Strict CSP prevents XSS attacks
- Token Security: Secure storage using Chrome's encrypted storage API
- API Security: All requests use HTTPS with proper authentication
- Data Privacy: No third-party data transmission
- Chrome 88+ (Manifest V3 support)
- GitHub account with repository access
- Basic understanding of Chrome extension development
- Clone the repository
- Make your changes to the source files
- Load the extension in Chrome developer mode
- Test with a valid GitHub Personal Access Token
- Verify functionality with test repositories
- popup.html: Main UI structure and layout
- popup.js: Frontend logic, event handling, and UI interactions
- background.js: Service worker for GitHub API operations
- styles/popup.css: Complete styling system with design tokens
- manifest.json: Extension configuration and permissions
- Use modern JavaScript (ES2020+)
- Follow consistent naming conventions
- Include comprehensive error handling
- Add comments for complex logic
- Maintain separation of concerns
The extension uses the following GitHub REST API endpoints:
GET /user- User information and token validationGET /user/repos- Repository listingPOST /user/repos- Repository creationGET /repos/{owner}/{repo}/branches- Branch listingGET /repos/{owner}/{repo}/git/trees/{sha}- Tree traversalGET /repos/{owner}/{repo}/git/blobs/{sha}- File contentPOST /repos/{owner}/{repo}/git/trees- Tree creationPOST /repos/{owner}/{repo}/git/commits- Commit creationPATCH /repos/{owner}/{repo}/git/refs/heads/{branch}- Reference updates
Internal message passing between popup and service worker:
// Authentication
{ action: 'validateToken', token: string }
{ action: 'storeToken', token: string }
{ action: 'getStoredToken' }
// Repository Operations
{ action: 'getRepositories', token: string }
{ action: 'createRepository', token: string, name: string, description?: string, isPrivate?: boolean }
{ action: 'getBranches', token: string, owner: string, repo: string }
// File Operations
{ action: 'uploadFiles', token: string, repository: object, files: array, commitInfo: object }
{ action: 'getBranchDetails', token: string, owner: string, repo: string, branch: string }
{ action: 'getTree', token: string, owner: string, repo: string, sha: string }
{ action: 'getBlobContent', token: string, owner: string, repo: string, sha: string }- Invalid Token: Ensure token has correct scopes (
repo,user:email) - Expired Token: Generate a new token if the current one has expired
- Network Issues: Check internet connection and GitHub API status
- Large Files: GitHub has file size limits (100MB per file, 1GB per repository)
- Invalid ZIP: Ensure the ZIP file is valid and exported correctly from Bolt.new
- Permission Issues: Verify token has write access to the target repository
- Encoding Problems: The extension handles various text encodings automatically
- Binary Files: Binary files are properly encoded for GitHub upload
- Path Issues: File paths are normalized for cross-platform compatibility
Enable Chrome Developer Tools for the extension popup to access console logs and debug information.
We welcome contributions! Please see SUMMARY.md for detailed technical documentation.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the code standards
- Test thoroughly with various scenarios
- Submit a pull request with a clear description
- Feature Enhancements: New functionality and improvements
- Bug Fixes: Issue resolution and stability improvements
- Documentation: Improve documentation and examples
- Testing: Add automated tests and improve test coverage
- Performance: Optimize file processing and API operations
This project is open source and available under the MIT License.
- Issues: Report bugs and request features via GitHub Issues
- Documentation: Refer to SUMMARY.md for technical details
- Community: Join discussions in GitHub Discussions
Try the web version at: github-bridge.netlify.app
Built with ❤️ for the developer community
Streamline your workflow from Bolt.new to GitHub with professional-grade tooling and seamless integration.