A lightweight desktop application that provides instant AI-powered text rewriting while you type in any application (Telegram, email, browsers, etc.). Simply select text and press Alt+Win+A to get intelligent rewrite suggestions.
- 🚀 Universal Text Rewriting: Works in any Windows application
- ⌨️ Quick Access: Trigger with
Alt+Win+Akeyboard shortcut - 🎯 Customizable Options:
- Length: Same, Shorter, Longer
- Tone: Same, Formal, Casual, Friendly, Professional
- Format: Same, Business, Academic, List, Summary, Expanded
- 👁️ Preview Before Apply: Review changes before replacing text
- 🔒 Privacy First: Direct OpenAI API connection, no third-party storage
- Windows OS
- AutoHotkey v1.1+
- Python 3.8+
- OpenAI API key
-
Clone the repository:
git clone <repository-url> cd TextMind
-
Install Python dependencies:
cd python pip install -r requirements.txt -
Configure OpenAI API:
-
Copy
.env.exampleto.env -
Add your OpenAI API key:
OPENAI_API_KEY=sk-your-api-key-here
-
-
Run the AutoHotkey script:
- Double-click
TextMind.ahkor - Right-click and select "Run Script"
- Double-click
- Select text in any application (Telegram, browser, email client, etc.)
- Press
Alt+Win+Ato open the rewrite options - Choose your preferences:
- Length adjustment
- Tone modification
- Format style
- Click "Rewrite" to generate suggestions
- Review the preview and click "Accept & Replace" to apply
TextMind/
├── TextMind.ahk # Main AutoHotkey script (GUI & hotkey handler)
├── python/
│ ├── rewriter.py # Python backend (OpenAI API integration)
│ └── requirements.txt # Python dependencies
├── .env.example # Environment template
├── .env # Your API keys (not in git)
└── README.md # This file
Edit TextMind.ahk line 12:
!#a:: ; Alt+Win+A (default)Hotkey syntax:
^= Ctrl+= Shift!= Alt#= Win
Edit .env:
OPENAI_MODEL=gpt-4 # Use GPT-4 for better quality"No text selected" message:
- Ensure text is actually selected before pressing the hotkey
- Try selecting text again
"Error rewriting text":
- Check your
.envfile has validOPENAI_API_KEY - Verify internet connection
- Ensure Python is in system PATH
GUI doesn't appear:
- Check if AutoHotkey is running (icon in system tray)
- Restart the
TextMind.ahkscript
To modify the rewriting logic, edit python/rewriter.py:
- Adjust prompts in
build_prompt()method - Change model parameters in
rewrite()method - Add new tone/format options
MIT License
Contributions welcome! Please open an issue or pull request.