Skip to content

mmizan85/2CP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2CP — Smart Clipboard Content Manager & Contextual Action Tool

A cross-platform, production-ready desktop productivity app built with Python 3 + PyQt6.


2CP Icon

---

Features

Feature Description
System Tray Runs silently; right-click for Dashboard, Settings, Quit
Action Overlay Frameless floating tooltip appears at cursor for 5 s on smart content
Smart Detection URLs, YouTube links, Emails, Hex colors, Code, JSON, XML, Currency
Inline Calc Copy calc: 500+250 → clipboard becomes 750 automatically
Secure Clipboard Passwords detected & masked (••••••••), never saved to disk
Hex Color Preview Color swatch shown in overlay and history for #RRGGBB values
JSON / XML Format Copied unformatted JSON/XML is auto-prettified and offered back
AI Integration Summarize / Fix Grammar via OpenAI, Gemini, or built-in mock
OCR Extract text from copied images via pytesseract
Network Sync Sync clipboard across LAN devices (UDP broadcast, HMAC-signed)
Global Hotkeys Ctrl+Shift+V open Dashboard, Ctrl+Shift+X clear history
Voice Dictation Ctrl+Shift+M → speak → clipboard filled
Analytics Daily copy counts, type breakdown, 14-day bar chart

📸 Visual Showcase

📟 Main Dashboard ⚙️ Advanced Settings
Popup Preview Server Preview

Installation

# 1. Clone / extract the project
cd 2cp

# 2. Create a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# Linux clipboard support (pick one)
sudo apt install xclip           # or: sudo apt install xdotool

# OCR support (optional)
sudo apt install tesseract-ocr   # macOS: brew install tesseract

# 4. Run
python main.py

Download & Install

  1. Donwnload Installar File: Windows
  2. Install : Install 2cp.exe file.

Configuration

All settings are stored in:

  • Windows: %APPDATA%\2CP\config.json
  • macOS: ~/Library/Application Support/2CP/config.json
  • Linux: ~/.2cp/config.json

Edit via Settings window (tray → Settings) or directly in the JSON file.

Key settings

{
  "general": {
    "overlay_duration": 5000,
    "history_limit": 100
  },
  "features": {
    "ai_enabled": false,
    "network_sync": false
  },
  "ai": {
    "provider": "mock",
    "api_key": "sk-..."
  }
}

AI Setup

  1. Open Settings → AI
  2. Set Provider to openai or gemini
  3. Paste your API key
  4. Enable Features → AI Actions

Without a key, set provider to mock for offline testing.


Network Sync

  1. Install 2CP on all devices
  2. Open Settings → Network on each device
  3. Set the same port and secret key
  4. Enable Features → Local Network Clipboard Sync

All clipboard data is HMAC-SHA256 signed to prevent spoofing.


Hotkeys

Action Default Hotkey
Open Dashboard Ctrl+Shift+V
Clear History Ctrl+Shift+X
Voice Dictation Ctrl+Shift+M

Customisable in Settings → Hotkeys.


Platforms

Platform Status
Windows 10/11 ✅ Full support
macOS 12+ ✅ Full support
Linux (X11) ✅ Requires xclip or xdotool
Linux (Wayland) ⚠️ Clipboard may need wl-clipboard

License

MIT — Free to use and extend.

About

2CP — Smart Clipboard Content Manager & Contextual Action Tool

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages