Chrome extension to capture images, send them to a local Ollama (GLM-OCR) endpoint, and return translated text.
- TypeScript files in
src/**/*.tsare the canonical source. - JavaScript files under
dist/are runtime artifacts emitted bynpm run build:extension. - Re-run
npm run build:extensionafter TypeScript changes before loading the unpacked extension.
- Capture visible tab screenshot
- Select region on page
- Right-click image to OCR/translate
- Configurable endpoint, prompt, and settings
- All processing local (no cloud)
- Install Ollama and pull the model:
ollama pull glm-ocr:latest
- Start Ollama (see
../ollama/README.md). - Install dependencies and build:
cd extension npm install npm run build:extension - Load this extension unpacked in Chrome from the
extension/folder. - Set endpoint URL in options (default:
http://localhost:11434/). - Optionally start the GLM-OCR layout service (see
../glm-ocr/README.md).
npm run build:extension
npm run verify:emit-sync
npm run verify:browser-esm-imports
npm run test:unit
npm run test:e2e:runtimeFrom repository root:
npm --prefix ./extension run test:unit- If the extension cannot connect, ensure Ollama is running at the configured URL.
- Check the options page for diagnostics and logs.