A lightweight system tray application for Linux that provides seamless file and clipboard content uploads to GitHub repositories.
- Clipboard Upload: Upload images and text from clipboard with configurable hotkey
- File Upload: Upload any file type through integrated file dialog
- Keyboard Shortcuts: Global hotkey support (default: Alt+Shift+U)
- System Tray Integration: Minimal background operation with system tray interface
- Auto-start Support: Optional automatic startup with system boot
- Configuration Management: Simple settings dialog for GitHub credentials
- Direct URL Generation: Automatic generation of shareable GitHub raw URLs
- Markdown Documentation: Instantly get URLs for images in your docs
- Blog Posts: Quick image hosting for articles and tutorials
- GitHub Issues: Upload screenshots and files effortlessly
- Academic Papers: Host diagrams and figures
- Technical Documentation: Quick file sharing for teams
- Linux (tested on Linux Mint)
- Python 3.11+
- Conda (recommended) or pip
-
Clone the repository:
git clone https://github.com/HuangJiaLian/Up2Git.git cd Up2Git
-
Create conda environment:
conda create -n up2git python=3.11 conda activate up2git
-
Install dependencies:
pip install -r requirements.txt
-
Configure your GitHub credentials: Create a
.env
file:nano .env
Add your GitHub token and repository:
GITHUB_TOKEN=your_github_personal_access_token GITHUB_REPO=username/repository-name UPLOAD_FOLDER=uploads BASE_BRANCH=main
-
Start the application:
python up2git_unified.py
- Go to GitHub Settings → Developer settings → Personal access tokens
- Click "Generate new token (classic)"
- Set expiration and select "repo" scope
- Copy the generated token to your
.env
file
Security Note: Never share your GitHub token publicly. The .env
file is already in .gitignore
.
Set up the global keyboard shortcut in your system:
-
Make the trigger script executable:
chmod +x trigger_shortcut.sh
-
Set up system keyboard shortcut:
- Go to System Settings → Keyboard → Shortcuts
- Add custom shortcut with command:
/full/path/to/Up2Git/trigger_shortcut.sh
- Assign Alt+Shift+U (or your preferred combination)
Enable automatic startup with your system:
chmod +x setup_autostart.sh
./setup_autostart.sh
- Copy an image to clipboard (screenshot, copy image from browser, etc.)
- Press
Alt+Shift+U
- Get the GitHub URL instantly in your clipboard!
- Right-click the system tray icon
- Select "Upload File..."
- Choose your file and get the URL
- Upload from Clipboard - Same as
Alt+Shift+U
- Upload File... - Open file dialog
- Settings... - Configure GitHub settings
- Quit - Close the application
Up2Git/
├── up2git_unified.py # Main application
├── trigger.py # Trigger file creator
├── trigger_shortcut.sh # Keyboard shortcut wrapper
├── autostart.sh # System startup script
├── setup_autostart.sh # Autostart installer
├── up2git-autostart.desktop # Desktop entry for autostart
├── icons/
│ └── icon.svg # Application icon (transparent SVG)
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── README.md # This file
Variable | Description | Example |
---|---|---|
GITHUB_TOKEN |
Your GitHub Personal Access Token | ghp_xxxxxxxxxxxx |
GITHUB_REPO |
Target repository (username/repo) | username/my-files |
UPLOAD_FOLDER |
Folder in repo for uploads | uploads |
BASE_BRANCH |
Target branch | main or master |
Access via right-click menu → Settings to configure:
- GitHub Token
- Repository
- Upload Folder
- Branch
Files are uploaded to GitHub and accessible via:
https://raw.githubusercontent.com/username/repository/branch/folder/filename
Perfect for markdown: 
- Images: PNG, JPG, GIF, BMP (from clipboard or files)
- Text: Any text content from clipboard
- Files: Any file type through file dialog
Icon not showing in system tray:
- Restart the application:
python up2git_unified.py
- Check if system tray is enabled in your desktop environment
Upload fails:
- Verify your GitHub token has
repo
scope - Check if the repository exists and you have write access
- Check your
.env
file configuration
Keyboard shortcut not working:
- Ensure
trigger_shortcut.sh
is executable:chmod +x trigger_shortcut.sh
- Use absolute path in keyboard shortcut settings
- Verify the application is running
Dependencies missing:
- Run
pip install -r requirements.txt
in your conda environment - Make sure you activated the conda environment:
conda activate up2git
Run from terminal to see debug output:
conda activate up2git
python up2git_unified.py
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with PyQt5 for the GUI
- Icons created with Pillow
- GitHub API integration
- Inspired by the need for quick file sharing in documentation workflows
Made with ❤️ for the Linux community