Writing autocompletion for Windows — local models or remote APIs
TypeNext started as an attempt to bring VS Code's inline completion and inline chat to any application, in a lightweight way. Today it offers:
- Works everywhere. Independent of any editor, IDE, or browser — use it in browsers, editors, Office, and more.
- Not an IME. Keep your current input method, including Chinese, Japanese, and Korean IMEs.
- Your choice of model. Run a local model or connect to a cloud API.
TypeNext reads a bounded amount of existing text around the caret in an approved, accessible textbox, asks a model for a continuation, and shows a floating preview. The text is inserted only when you accept it. It is a desktop helper, not a registered Windows TSF IME: it uses UI Automation plus a few dedicated text adapters, such as one for PowerPoint.
9.20.mp4
Warning
Not applicable to Weixin/WeChat, which has restrictions on accessibility, clipboard use, and keyboard tracking.
Tip
If you are experienced with Go and Windows development, and interested in contributing, feel free to join as a contributor. I may not have time to refine the codebase or add features.
- Run
TypeNext.exeon Windows x64. TypeNext itself needs no Python, Node, Go, or .NET runtime installation. - Click New model in 1 Connect a model. Enter a Saved name, select the Protocol, and enter your provider's API URL, Model ID, and API key. Then enable Allow remote HTTPS API requests.
- Click Test API (sample) and approve the exact endpoint. The test sends a fixed sample, not application text. API usage can still be charged.
- Close API settings, open the test pad, and request a continuation with Ctrl+Space. Accept the completed preview with Ctrl+Shift+F10.
Tip
You can top up a small balance for DeepSeek, whose API is cheap enough for completion tasks. This is cheaper than local deployment for most users. DeepSeek's API is compatible with OpenAI's, so you can use the same settings in TypeNext.
Install and start Ollama separately. For the existing example configuration, run:
ollama pull qwen3:4bClick New model in 1 Connect a model. Enter a Saved name you like, set Protocol to ollama, Model ID to qwen3:4b (or another installed model), and API URL to http://127.0.0.1:11434, then click Save model. Close API settings and click Test model. It sends a fixed sample. TypeNext does not download or start models for you. A local server must also be configured not to forward prompts to cloud services.
For an OpenAI-compatible local server, select openai-compatible, enter its base URL (for example http://127.0.0.1:1234/v1), and use its exact loaded model ID. API settings also accepts a full /chat/completions endpoint. Local servers needing authentication can use the same saved-key or environment-key settings.
Choose a Saved model on the main page to switch connections immediately. TypeNext remembers your selection for the next launch and includes your existing connection in the list. Click API settings… to edit the selected model, or New model to open a form with an empty name, API URL, model ID, and API key. Click Save model to save the connection. Saving under a different name keeps the previous configuration. Each saved model remembers its remote permissions and uses the default request options. Typing behavior, shortcuts, and approved applications are shared across models, and Save settings applies changes to the main page's controls.
The read-only Key storage file row in API settings shows the full path to config.json, which stores encrypted keys along with your settings. Copy the path to open the file manually. To remove a saved key, exit TypeNext, delete its endpoint entry from encrypted_api_keys, save the file, and restart TypeNext. Deleting the whole file resets all saved settings and models as well as keys. Environment-variable keys remain supported through api_key_environment_variable in the configuration.
Use Pause at the top of the main window to stop suggestions; click Resume to enable them again. The button stays in sync with the tray action and pause/resume shortcut.
| Action | Default shortcut |
|---|---|
| Read focused textbox and request continuation | Ctrl+Space |
| Accept a finished suggestion | Ctrl+Shift+F10 |
| Cancel/dismiss | Esc |
| Pause/resume | Ctrl+Shift+F11 |
| Accept with Tab | On by default; configurable in settings |
Automatic suggestions are off by default. Enable Automatic suggestions in the main window. For a remote API, also enable Allow automatic remote requests in API settings and approve the endpoint. With only the first switch enabled, remote completion remains manual; the main status text explains this.
The default typing-pause delay is 1000 ms. Settings are saved in %APPDATA%\TypeNext\config.json; config.example.json lists the factory defaults. Saved settings override those defaults.
The default executable allowlist is:
chrome.exe
msedge.exe
notepad.exe
typora.exe
winword.exe
powerpnt.exe
This grants permission to attempt a read; it is not a tested compatibility list. Browser approval (chrome.exe or msedge.exe) applies to accessible textboxes across that browser, not one website.
Text fields are recognized by their accessibility text and caret support, including editable search comboboxes and custom editors. TypeNext also supports TextChild providers when the focused field exposes a writable value and a verifiable field boundary inside its text container. Reads stay within that boundary. An unsupported text editability attribute can fall back to the same field's ValuePattern metadata; read-only, mixed, or failed attributes remain blocked. Fields with selected text, protected fields, and controls exposing only a value without a reliable caret are not supported.
Password-manager applications, credential dialogs, and terminal hosts on the built-in blocklist remain blocked even if added. This list is not exhaustive, and ordinary textboxes can contain sensitive material. TypeNext's own API-settings fields are not used as completion context.
TypeNext does not write source text, generated suggestions, or plaintext keys to its configuration or logs. Saved keys use endpoint-bound, current-user DPAPI ciphertext; encrypted local storage is not protection from malware running as you. Keys and text necessarily exist in memory while used. OS paging/crash dumps and model-server behavior are outside TypeNext's control.
Remote inference requires HTTPS, certificate validation, explicit endpoint approval, and a separate automatic-use permission. Redirects and proxy environment variables are disabled. URL credentials/query-string secrets are not accepted. Local endpoints can still forward or log prompts; a loopback URL does not prove local inference. Remote providers may retain data under their policies.
Before insertion, focus and context are checked again after acceptance-key release. Text is inserted with Unicode keyboard input, not the clipboard. Newlines, tabs, and control characters are removed or replaced; TypeNext never deliberately presses Enter or clicks Send. These checks followed by SendInput are not an atomic edit transaction. A small cross-process edit/focus race remains.
Elevated apps and custom controls can block input. Do not use TypeNext for passwords, secrets, banking forms, or other high-stakes text. Always review a suggestion before accepting it.
There are no external Go module dependencies. Build with Go 1.23 or later. The executable is unsigned.
On Windows x64:
.\scripts\Build.ps1Cross-build on Linux/macOS:
sh scripts/build.shBoth scripts write TypeNext.exe to the project root. The Windows build runs all automated tests and static analysis; the cross-build runs portable tests and checks the Windows source before compiling. Portable tests use mock HTTP/HTTPS servers and test credentials. Live application compatibility and model responses require manual checks on Windows.
TypeNext source is MIT-licensed. The statically linked Go runtime/standard-library license is in THIRD_PARTY_GO_LICENSE.txt. No model weights, third-party API credits, or paid service subscriptions are included.