A minimalistic OS-level text revision tool powered by AI. It runs in the system tray/background, and when triggered by a custom keyboard shortcut, it reads the selected text, securely routes it through Litellm (supporting OpenAI, Anthropic, Gemini, OpenRouter), and instantly replaces the text with grammatically corrected output. Includes a slick overlay toast notification for processing status.
- Python 3.10+: Ensure Python is installed and added to your system
PATH. - Git: For cloning the repository.
Follow these steps to set up the development environment from scratch:
1. Clone the repository
git clone <your-repo-url>
cd ai-text-revisor2. Create a virtual environment It's highly recommended to use a virtual environment to manage dependencies locally.
python -m venv venv3. Activate the virtual environment
- Windows (PowerShell):
.\venv\Scripts\Activate.ps1 - Windows (CMD):
.\venv\Scripts\activate.bat - Mac/Linux:
source venv/bin/activate
4. Install requirements Install all required packages needed for the application and compilation:
pip install customtkinter keyboard pyperclip litellm requests python-dotenv keyring pyinstallerOnce everything is installed and the virtual environment is activated, you can run the app locally:
python main.pyTo package the application into a single executable file that can run without installing Python, we use PyInstaller. Since litellm and tiktoken require specific metadata and dynamically loaded encodings, a custom build command is necessary.
Ensure your virtual environment is active before running this command.
Run the following command from the project root (ai-text-revisor folder):
python -m PyInstaller --clean --noconfirm --noconsole --onefile `
--collect-all customtkinter `
--collect-all litellm `
--collect-all tiktoken `
--copy-metadata tiktoken `
--hidden-import=tiktoken_ext.openai_public `
--hidden-import=tiktoken_ext `
--hidden-import=keyring.backends.Windows `
--hidden-import=keyring.backends `
--name "AI Text Revisor" `
main.py--clean: Cleans PyInstaller cache and removes temporary files.--noconfirm: Replaces the output directory without asking.--noconsole: Hides the command prompt window behind the app GUI.--onefile: Bundles everything into a single.exefile.--collect-all: Essential for large UI frameworks (customtkinter) and dynamic libraries (litellm, tiktoken) which load assets/data files behind the scenes.--copy-metadata: Required specifically bytiktokenso it can find its package info at runtime.--hidden-import: Forcibly includes modules that PyInstaller cannot statically detect during its analysis step (liketiktokenencodings and Windowskeyringstorage modules).
After execution finishes, your standalone application will be located at:
dist/AI Text Revisor.exe