Frai is an experimental AI-powered Input Method Editor (IME) for Windows. It provides intelligent "Ghost Text" code completions and a contextual Chat Assistant directly inside any application (Notepad, VS Code, etc.).
- 👻 Ghost Text Overlay: Real-time autocomplete suggestions displayed as gray text ahead of your cursor.
- Usage: Just type! Press TAB to accept a suggestion.
- 💬 AI Chat Mode: A floating assistant window for complex queries.
- Usage: Press
Ctrl + Spaceanywhere to toggle.
- Usage: Press
- ⚡ Native Performance: Core logic written in C++ for ultra-low latency, bridging to a flexible Python brain for AI logic.
- OS: Windows 10/11 (64-bit).
- Build Tools: Visual Studio with C++ Desktop Development support (MSVC) and CMake.
- Python: Python 3.8 or newer.
-
Initialize Python Environment:
setup_env.bat
Creates a virtual environment and installs dependencies.
-
Build C++ Core:
build_all.bat
Compiles the
FraiIME.dlland registers it.
-
Start the Keyboard:
start_frai.bat
Must be run as Administrator because it interacts with Windows Input Methods.
- You will see a console window titled "Frai AI Backend". Keep this open!
- Logs will confirm "UI Overlay Started".
-
Stop:
stop_frai.bat
Cleanly shuts down the Python backend and unregisters the IME.
-
"DLL failed to load" / Updates didn't apply: If you modified C++ code and the build failed to overwrite the DLL because it was locked:
- Close all apps using the keyboard (Notepad, etc.).
- Run
rebuild_and_update.bat.
-
Ghost Text not visible: Ensure
start_frai.batlogs "UI Overlay Active". The overlay is formatted as a light gray box with black text.