A minimal TypeScript and React Chrome extension to correct selected text in inputs/textareas using a configurable LLM from OpenAI-compatible or Anthropic providers.
- Corrects selected text in any editable input field or textarea.
- Supports both OpenAI-compatible APIs and Anthropic (Claude) models.
- Configurable API provider, endpoint (for OpenAI), model name, and API key.
- Activates via a keyboard shortcut (
Alt+Shift+Kby default) or context menu. - Simple, no-frills UI built with React.
- Install Dependencies: Requires Node.js.
npm install- Build the Extension:
npm run build- Load into Chrome:
- Navigate to
chrome://extensions. - Enable "Developer mode" in the top-right corner.
- Click "Load unpacked" and select the
distfolder from this project.
- Navigate to
- After installing, open the extension's options page. You can usually find this by clicking the extension's icon in the Chrome toolbar and selecting "Options", or by clicking "Details" on the
chrome://extensionspage and finding the options link. - Select your API Provider: Choose between "OpenAI-compatible" or "Anthropic (Claude)".
- Enter API Details:
- For OpenAI-compatible, provide your API Base URL and the specific Model name you want to use.
- For Anthropic, you only need to provide the Model name (e.g.,
claude-3-haiku-20240307). The API base URL is fixed.
- Enter your API Key.
- Click Save. You can use the "Test API Connection" button to verify your settings.
- Click into any editable text area on a webpage (like a textarea or input field).
- Select the text you want to correct.
- Either:
- Press the keyboard shortcut
Alt+Shift+K. - Right-click on the selection and choose "Correct with LLM" from the context menu.
- Press the keyboard shortcut
The selected text will be replaced with the corrected version from the LLM.