ClipGuard is a lightweight, privacy-focused system tray application for Linux that automatically masks sensitive information in your clipboard. Protect your privacy when copying and pasting emails, phone numbers, credit cards, IP addresses, and more.
- Email addresses โ
[REDACTED_EMAIL] - Phone numbers (US format) โ
[REDACTED_PHONE] - IPv4 addresses โ
[REDACTED_IP] - Credit card numbers โ
[REDACTED_CC] - Social Security Numbers โ
[REDACTED_SSN]
ClipGuard only masks sensitive data when it's part of larger text. If you copy just an email address alone, it won't be maskedโwe assume you copied it intentionally.
Remove tracking parameters and unwrap redirectors:
- Strips
utm_*,fbclid,gclid,mc_eid,igshid - Unwraps Google and Facebook redirectors
- Converts AMP URLs to canonical form
- Enable/disable any built-in rule
- Add custom regex patterns for your specific needs
- Settings saved to
~/.config/clipguard/settings.json
Made a mistake? Use "Restore Last Content" to get back the unmasked text anytime.
- Clean, professional interface with emoji icons
- Tabbed settings dialog with built-in help
- Smart notifications with content previews
- Tooltips on every element
All distributions require:
- Python 3.7+
- xclip or xsel (for clipboard access)
# Install system dependencies
sudo apt update
sudo apt install python3 python3-pip python3-venv xclip git
# Clone the repository
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Run ClipGuard
./run.shOptional: Add to autostart
mkdir -p ~/.config/autostart
cp clipguard.desktop ~/.config/autostart/# Install system dependencies
sudo dnf install python3 python3-pip xclip git
# Clone the repository
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Run ClipGuard
./run.shAuto-start on Login (Fedora/RHEL):
mkdir -p ~/.config/autostart
cp clipguard.desktop ~/.config/autostart/# Install system dependencies
sudo pacman -S python python-pip xclip git
# Clone the repository
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Run ClipGuard
./run.shAuto-start on Login (Arch/Manjaro):
mkdir -p ~/.config/autostart
cp clipguard.desktop ~/.config/autostart/AUR Package (Coming Soon)
yay -S clipguard# Install system dependencies
sudo zypper install python3 python3-pip xclip git
# Clone the repository
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Run ClipGuard
./run.shAuto-start on Login (openSUSE):
mkdir -p ~/.config/autostart
cp clipguard.desktop ~/.config/autostart/If your distribution isn't listed above:
# Ensure you have Python 3.7+ and pip installed
python3 --version
pip3 --version
# Install xclip or xsel (check your package manager)
# Examples:
# sudo apt install xclip # Debian-based
# sudo dnf install xclip # Fedora-based
# sudo pacman -S xclip # Arch-based
# sudo zypper install xclip # openSUSE
# Clone and set up
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./run.sh./run.shor
python3 main.pyLook for a green shield icon (๐ก๏ธ) in your system tray.
Copy this text:
Contact me at john.doe@example.com or call 555-123-4567
Paste it somewhere and you should see:
Contact me at [REDACTED_EMAIL] or call [REDACTED_PHONE]
Right-click the tray icon โ "๐ Restore Last Content" โ Paste again to see the original.
Right-click the icon โ "โ๏ธ Settings"
- Browse built-in rules
- Add custom patterns
- Read the Help tab for examples
Right-click the ClipGuard icon to access:
๐ Status
โธ๏ธ Stop Monitoring Toggle protection on/off
โก Quick Actions
๐ Restore Last Content Get back unmasked text
๐ Clean Last Link Remove URL tracking
โ๏ธ Settings Customize masking rules
โน๏ธ About ClipGuard Learn about features
โ Quit Exit application
- Open Settings from the tray menu
- Go to the "๐ Masking Rules" tab
- Fill in the "Add Custom Rule" section:
- Name: Descriptive name (e.g., "API Key")
- Pattern: Regex pattern (e.g.,
sk-[A-Za-z0-9]{48}) - Replacement: Placeholder (e.g.,
[REDACTED_API_KEY])
- Click "โ Add Rule"
- Click "๐พ Save & Close"
Examples:
| Name | Pattern | Replacement |
|---|---|---|
| OpenAI API Key | sk-[A-Za-z0-9]{48} |
[REDACTED_API_KEY] |
| Bitcoin Address | \b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b |
[REDACTED_BTC] |
| Employee ID | EMP-\d{6} |
[REDACTED_EMP_ID] |
| AWS Key | AKIA[0-9A-Z]{16} |
[REDACTED_AWS_KEY] |
mkdir -p ~/.local/share/applications
cp clipguard.desktop ~/.local/share/applications/
chmod +x ~/.local/share/applications/clipguard.desktop
update-desktop-database ~/.local/share/applicationsClipGuard will now appear in your application menu under "Utilities" or "Security".
Make ClipGuard start automatically when you log in:
mkdir -p ~/.config/autostart
cp clipguard.desktop ~/.config/autostart/This works on all distributions:
- โ Ubuntu / Debian / Linux Mint / Pop!_OS
- โ Fedora / RHEL / CentOS
- โ Arch Linux / Manjaro
- โ openSUSE
- โ Any distribution with XDG autostart support
Verify it's enabled:
ls -la ~/.config/autostart/clipguard.desktopTo disable autostart:
rm ~/.config/autostart/clipguard.desktopGNOME Users: Install the "AppIndicator and KStatusNotifierItem Support" extension.
# Ubuntu/Debian
sudo apt install gnome-shell-extension-appindicator
# Fedora
sudo dnf install gnome-shell-extension-appindicator
# Arch
sudo pacman -S gnome-shell-extension-appindicator-gitThen enable it in GNOME Extensions/Tweaks.
Settings are stored in: ~/.config/clipguard/settings.json
Example configuration:
{
"monitoring_active": true,
"builtin_patterns": {
"Email": {
"pattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b",
"replacement": "[REDACTED_EMAIL]",
"enabled": true
}
},
"custom_patterns": {
"API Key": {
"pattern": "sk-[A-Za-z0-9]{48}",
"replacement": "[REDACTED_API_KEY]",
"enabled": true,
"custom": true
}
}
}Run the included test scripts to verify functionality:
./test_cross_app.py./test_restore.pyFor comprehensive testing instructions, see TESTING.md.
- Check monitoring is enabled: Icon should be green
- Install xclip or xsel:
sudo apt install xclip - Check console for errors:
python3 main.py
- Install system tray extension (see Desktop Integration above)
- Check if your DE supports system tray
- Try restarting your desktop environment
chmod +x run.sh main.py test_*.py# Update pip
pip install --upgrade pip
# Reinstall dependencies
pip install -r requirements.txt --force-reinstall- INSTALL.md - Detailed installation guide
- TESTING.md - Testing procedures
- UI_GUIDE.md - Complete UI tour
- WHATS_NEW.md - v1.1 feature announcement
- CHANGELOG.md - Version history
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Clone your fork
git clone https://github.com/qusaismael/ClipGuard.git
cd ClipGuard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run in development mode
python3 main.py- Follow PEP 8
- Add docstrings to functions and classes
- Comment complex logic
- Test your changes thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
Built with:
- PyQt6 - Modern GUI framework
- pyperclip - Cross-platform clipboard access
- Python 3 - Powerful and elegant
Inspired by the need for privacy-conscious computing on Linux.
If you find ClipGuard useful, please consider giving it a star! โญ
ClipGuard processes all data locally on your machine. No data is ever sent over the network.
If you discover a security vulnerability, You can open an issue above.
- Support for more data types (passport numbers, dates of birth, etc.)
- Multi-language phone number support
- Clipboard history with auto-masking
- Export/import custom rules
- Dark mode theme
- Flatpak/Snap package
- Wayland-native implementation
If ClipGuard helps protect your privacy, consider:
- โญ Starring this repository
- ๐ Reporting bugs you encounter
- ๐ก Suggesting features you'd like to see
- ๐ Contributing code or documentation
- ๐ฃ๏ธ Spreading the word to friends and colleagues
Made with โค๏ธ for privacy-conscious Linux users
ClipGuard v1.0 | October 2025