Instantly clone and run locally any github repository!
Thunderclone's goal is to allow you tu run locally any github repository with just the click of a button, like if the repo was brought on your machine by a thunder! 😎
The idea is the following:
-
a chrome extension will inject a button to the github repository page. When clicked, it will send a message to a desktop agent app
-
the electron based agent app (which must be running locally) will listen to the extension and clone the repository in a folder of your choice
-
using AI, the app will try to understand the list of commands needed to run the project and return the list of commands in json format to be executed by the client electron app
-
the desktop agent app will then run the commands
👉 READ CAREFULLY 👈 This is a super early stage project, just the seed of an idea. In order to mitigate security risks (of running a local websocket which clones locally an arbitrary repository), the agent app at the moment requires to enter a password to run. This password is saved in memory and never stored anywhere, you can read more ahead about how it is used
thunderclone.demo.mp4
The repository, as it is now, is just a "box" for 2 distinct projects located in their own folders. In the future it will become a monorepo. The project is composed of:
The desktop application serves as the core of Thunderclone. It:
-
Starts a local WebSocket server
-
Manages repository cloning operations
-
Allows users to specify and manage clone directories and other preferences (eg: openai api key)
The browser extension enhances the GitHub experience by:
-
Adding a "Clone" button to GitHub repository pages
-
Sending clone requests to the Electron app via WebSocket
Thunderclone implements a password protection system to enhance security when cloning repositories. This system ensures that only authorized users can initiate the cloning process. Here's how it works:
- When you first launch the Thunderclone desktop app, you'll be prompted to set a password.
- This password is stored securely in the app's memory and is used to authenticate clone requests.
- The Chrome extension adds a "Thunderclone" button to GitHub repository pages.
- When you click this button, a small popup appears, asking for the password you set in the desktop app.
-
After entering the password in the Chrome extension popup, the extension creates a secure signature using the following information:
- The GitHub repository URL
- The current timestamp
- The entered password
-
This signature, along with the repository URL and timestamp, is sent to the desktop app.
-
The desktop app receives this information and verifies the signature using the stored password.
-
If the signature is valid and the timestamp is recent, the desktop app proceeds with cloning the repository.
-
If the signature is invalid or the timestamp is too old, the cloning request is rejected.
- The password is never transmitted directly between the extension and the desktop app.
- The signature system prevents replay attacks, as each request has a unique timestamp.
- Even if someone intercepts the communication, they can't clone repositories without knowing the password.
- You'll need to enter this password each time you want to clone a repository using Thunderclone.
- If you forget the password, you'll need to restart the desktop app and set a new password.
- The password is not stored persistently, so it's reset when you close and reopen the desktop app.
This system provides a balance between security and convenience, ensuring that your Thunderclone usage remains protected while still being user-friendly.
This is an high level overview of the features with their current status.
-
🖥️ Electron desktop app for managing cloned repositories
- Electron app running locally and listening on socket
- Headless mode with tray icon to start and stop the server
- Handle clone message sent from extension and clone the repo
- Configuration panel.
Until this is is not done, the repository will be cloned in the following path:
<user-home-dir>/.thunderclone/<repo-owner>/<repo-name>
, with configuration panel it will be configurable - Automatically run locally the project by parsing the readme file with AI. Until the configuration panel is not implemented, we cannot ask AI api key
- Start at system startup
-
🧩 Chrome extension for one-click cloning from GitHub
- Chrome extension that adds a button to a GitHub repository's home page
- Clicking the button call the extension which clones the repo
- Customize button
- Configuration panel
- Better error handling (eg: socket not connected)
-
🔗 WebSocket communication between the extension and desktop app
-
⚡ Instant cloning with a single click
For now it has been tested it only on a mac
-
Node.js (version 18 or higher)
-
Google Chrome browser
For now this project is just a repository with 2 separate folders each one containing a project. I'd like to make it a monorepo when I will have time
- Clone this repository:
git clone https://github.com/apperside/github-cloner.git
cd thunderclone
- Install dependencies:
npm install
- Build the Electron app:
npm start
- Install the Chrome extension:
-
Open Chrome and navigate to
chrome://extensions
-
Enable "Developer mode"
-
Click "Load unpacked" and select the
browser-extension
folder from this project
- Launch the Electron app:
npm start
-
In the Electron app, specify your preferred clone directory
-
Navigate to any GitHub repository in Chrome
-
Click the "Thunderlone" button added by the extension
-
The repository will be instantly cloned to
<user-home-dir>/.thunderclone/<repo-owner>/<repo-name>
folder
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is MIT licensed.
Made with ❤️ by Your Name