Turn Every Copy-Paste into Clean, Polished Writing with Clipboard Rewriter

Flixacct

If you write emails, reports, captions, or client updates all day, you already know how much time small edits can steal. Grammar fixes, tone adjustments, and quick rewrites add up fast.

That’s exactly why I built Clipboard Rewriter — a lightweight Python app that lives quietly in your Windows tray and rewrites copied text instantly using Google Gemini 1.5 Flash.

No tabs. No browser workflow. No switching context. Copy text, press a hotkey, and paste a cleaner version.

Why this tool is useful

Clipboard Rewriter helps when you need to:

  • Clean up grammar in seconds
  • Adjust tone (formal, casual, or business)
  • Rewrite rough drafts into polished text
  • Keep working without leaving your current app

It runs in the background, sends native Windows notifications, and keeps a history of rewrites automatically.

Key features

  • 🧠 Powered by Google Gemini 1.5 Flash
  • 📝 Instant clipboard rewrite with Ctrl + Shift + B
  • 🔁 Style switcher: Formal / Casual / Business
  • 📌 System tray controls with right-click menu
  • 🔔 Native Windows toast notifications
  • 💾 Auto-saved rewrite history in a local log
  • 🪶 Lightweight and background-friendly

How to install

1) Clone the repository

git clone https://github.com/ashik4u/clipboard-rewriter-genai.git
cd clipboard-rewriter-genai

2) Install dependencies

pip install -r requirements.txt

Or install manually:

pip install pyperclip keyboard pystray pillow winotify google-generativeai

3) Add your Gemini API key

In the script, set:

genai.configure(api_key="YOUR_GEMINI_API_KEY")

Get your key here: https://aistudio.google.com/app/apikey

How to use it

Run the app:

python clipboard_rewriter.py

Then:

  1. Copy any text.
  2. Press Ctrl + Shift + B.
  3. Paste the rewritten version wherever you want.

From the tray icon menu, you can:

  • Enable or disable rewriting
  • Change writing style
  • Open the rewrite log
  • Exit the app

Rewrite history log

Every rewrite is saved in rewrite_log.txt using this structure:

---
Original:
Your original text...

Rewritten:
Your improved Gemini-polished version...

Optional: Build a portable .exe

pip install pyinstaller
pyinstaller --onefile --noconsole clipboard_rewriter.py

The executable will be generated in the dist/ folder.

What’s next

Planned improvements:

  • Custom prompt profiles
  • GPT + Gemini model toggle
  • Multi-language rewriting
  • Auto-start on Windows login

Credits

1 comment

  1. Ashik
    Ashik
    Fantastic Job!! Could you please provide the exe file?