Ditto is a real-time clipboard synchronization tool powered by Firebase Firestore. It enables seamless clipboard sharing between multiple devices securely and efficiently. With end-to-end encryption, Ditto ensures your clipboard content stays private while synchronizing across devices, eliminating the need for third-party servers.
- π Real-Time Clipboard Sync: Automatically sync clipboard content across devices in real time.
- π End-to-End Encryption: AES-256 encryption ensures your clipboard data remains secure.
- β‘ Cross-Platform: Compatible with any device that runs Python and supports Firebase.
- π οΈ Lightweight: Minimal resource usage with no unnecessary bloat.
- Run Ditto on each device as a self-hosted Python application.
- Clipboard changes are encrypted and uploaded to Firebase Firestore.
- Other devices retrieve the encrypted data, decrypt it, and update their local clipboard in real time.
- Python 3.9+ installed on all devices.
- Firebase Firestore account.
- A valid firestore.json service account key file downloaded from the Firebase Console.
- modules : Holds all the essential modules for the app
- tests : Holds all the unittests for the modules.
- startScript.py : The main script to start the app.
- README.md : Instructions to run the code.
- firebase config json file : Configuration file required to connect to firebase.
- requirements.txt : Dependencies for the project.
git clone https://github.com/py-xis/Ditto.git
cd Ditto
Step 2 : Ensure that you have the firebase config json file in the project's root directory. The directory must look like this with the firebase config json file.
Install the required Python libraries:
pip install -r requirements.txt
- Note the following,
- This project uses the pyperclip module.
- If you are on windows, then you require no additional modules.
- If you are on macOS, you need pbcopy and pbpaste commands, which should come with the os.
- If you are on Linux, then pyperclip module makes use of the xclip or xsel commands, which should come with the os. Otherwise run
sudo apt-get install xcliporsudo apt-get install xsel(Note: xsel does not always seem to work.)
(Not needed if, you already have a firebase config file)
- Create a Firebase project in the Firebase Console.
- Enable the Firestore Database in the project.
- Download the firestore.json file:
- Go to Project Settings > Service Accounts.
- Click Generate New Private Key and download the file.
- Save the firestore.json file in the Ditto project directory.
(Not needed if, you already have a firebase config file)
Start Ditto using the following command:
python startScript.py
- On the first run, enter a unique username. This username will group your devices for synchronization.
- Ditto will automatically add the current device to Firestore.
- Clipboard changes will sync in real-time across all devices using the same username.
- Manages local clipboard access using the Clipboard class.
- Implements the Singleton Pattern to ensure a single instance per process.
- AES-256 encryption/decryption for ultimate security.
- Protects clipboard data from unauthorized access.
- Synchronizes clipboard content using Firestore.
- Automatically adds new devices to the user group.
- Listener monitors Firestore for changes and updates the clipboard.
- Uploader detects local clipboard changes and uploads them to Firestore.