Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextMind - AI-Powered Text Rewriter

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.

Features

  • 🚀 Universal Text Rewriting: Works in any Windows application
  • ⌨️ Quick Access: Trigger with Alt+Win+A keyboard 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

Prerequisites

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd TextMind
  2. Install Python dependencies:

    cd python
    pip install -r requirements.txt
  3. Configure OpenAI API:

    • Copy .env.example to .env

    • Add your OpenAI API key:

      OPENAI_API_KEY=sk-your-api-key-here
  4. Run the AutoHotkey script:

    • Double-click TextMind.ahk or
    • Right-click and select "Run Script"

Usage

  1. Select text in any application (Telegram, browser, email client, etc.)
  2. Press Alt+Win+A to open the rewrite options
  3. Choose your preferences:
    • Length adjustment
    • Tone modification
    • Format style
  4. Click "Rewrite" to generate suggestions
  5. Review the preview and click "Accept & Replace" to apply

Project Structure

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

Configuration

Changing the Hotkey

Edit TextMind.ahk line 12:

!#a::  ; Alt+Win+A (default)

Hotkey syntax:

  • ^ = Ctrl
  • + = Shift
  • ! = Alt
  • # = Win

Changing the AI Model

Edit .env:

OPENAI_MODEL=gpt-4  # Use GPT-4 for better quality

Troubleshooting

"No text selected" message:

  • Ensure text is actually selected before pressing the hotkey
  • Try selecting text again

"Error rewriting text":

  • Check your .env file has valid OPENAI_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.ahk script

Development

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

License

MIT License

Contributing

Contributions welcome! Please open an issue or pull request.

About

AI Lab Text rewrite tool

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages