Skip to content

jmdlab/retext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retext

Retext

Select text anywhere in Windows. Press a hotkey. Get it corrected in place.
Grammar, spelling, punctuation, capitalization — fixed in ~1 second.

Platform Python License


How it works

Select text → Ctrl+Shift+R → text corrected in place

Retext sits in your system tray. When you trigger the hotkey, it:

  1. Copies the selected text via Ctrl+C
  2. Sends it to the Gemini API for correction
  3. Pastes the corrected version via Ctrl+V
  4. Restores your original clipboard

The language is auto-detected — works with any language Gemini supports.

Quick start

  1. Download Retext.exe from Releases
  2. Get a free API key at aistudio.google.com/apikey
  3. Run Retext.exe — it appears in the system tray
  4. Right-click the tray icon → Settings → paste your API key → Save
  5. Select text anywhere → press Ctrl+Shift+R

Settings

Right-click the tray icon → Settings:

Setting Default Description
API Key Your Gemini API key (get one free)
Model gemini-2.5-flash Any Gemini model name
Hotkey Ctrl+Shift+R Click Record to change

Config is stored in %APPDATA%\Retext\config.json. The API key is stored securely in Windows Credential Manager.

Build from source

Requires Python 3.12+.

# Clone
git clone https://github.com/probablyagoodusername/Retext.git
cd Retext

# Install dependencies
python -m venv .venv
.venv\Scripts\activate
pip install -e .

# Run
python -m rewrite.main

# Build .exe
pip install pyinstaller
pyinstaller --onefile --windowed --name Retext --icon assets\icon.ico --add-data "assets;assets" src\rewrite\main.py
# Output: dist\Retext.exe

Run tests

pip install pytest ruff
pytest
ruff check src/

How it's built

Component Library
Global hotkey pynput
Clipboard pyperclip + pynput
AI google-genai (Gemini)
System tray pystray + Pillow
Settings UI tkinter (stdlib)
Packaging PyInstaller

Credits

Icon by Sergei Kokota

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors