{"id":13542434,"url":"https://github.com/coollabsio/safetyper","last_synced_at":"2026-04-01T18:41:06.774Z","repository":{"id":176667482,"uuid":"659239705","full_name":"coollabsio/safetyper","owner":"coollabsio","description":"A Grammarly alternative where you own what you type on your keyboard.","archived":false,"fork":false,"pushed_at":"2023-10-16T12:33:49.000Z","size":10,"stargazers_count":96,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-09T18:23:09.867Z","etag":null,"topics":["ai","grammar","grammarly-alternative","privacy"],"latest_commit_sha":null,"homepage":"https://safetyper.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coollabsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-27T12:15:22.000Z","updated_at":"2025-10-04T15:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d88d2b0-c891-48c4-8f1a-fbf663a33264","html_url":"https://github.com/coollabsio/safetyper","commit_stats":null,"previous_names":["coollabsio/safetyper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coollabsio/safetyper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coollabsio%2Fsafetyper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coollabsio%2Fsafetyper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coollabsio%2Fsafetyper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coollabsio%2Fsafetyper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coollabsio","download_url":"https://codeload.github.com/coollabsio/safetyper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coollabsio%2Fsafetyper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","grammar","grammarly-alternative","privacy"],"created_at":"2024-08-01T10:01:07.640Z","updated_at":"2026-04-01T18:41:06.765Z","avatar_url":"https://github.com/coollabsio.png","language":null,"funding_links":[],"categories":["ai","Others","TypeScript"],"sub_categories":[],"readme":"# SafeTyper\n\n\u003e A Grammarly alternative, where YOU own what you type on your keyboard.\n\nSafeTyper is a browser extension that provides real-time grammar and spelling suggestions powered by AI models through [OpenRouter](https://openrouter.ai), [Groq](https://groq.com), or a local [Ollama](https://ollama.com) instance.\n\n## Features\n\n- **Universal Input Detection** — works on any editable field across the web\n- **Multiple AI Providers** — OpenRouter (GPT, Claude, Gemini, Llama), Groq (Llama, Gemma, Mixtral), and Ollama (local models)\n- **Smart Caching** — reduces API calls and improves response time\n- **Visual Diff Display** — inline highlighting of changes\n- **Adaptive Icon Positioning** — smart placement for any input field size\n- **Multi-Browser** — Chrome and Firefox with automated publishing\n- **Privacy-First** — secure API key storage, rate limiting, key format validation\n\n## Quick Start\n\n1. Install dependencies: `bun install`\n2. (Optional) Create `.env` from `.env.example` with your API key\n3. Start dev server: `bun run dev` (Chrome) or `bun run dev:firefox` (Firefox)\n4. Load the extension in your browser\n5. Configure your API key in the extension popup (or it auto-loads from `.env` in dev mode)\n\nYou'll need [Bun](https://bun.sh/) (or Node.js 18+) and an API key from [OpenRouter](https://openrouter.ai/keys) or [Groq](https://console.groq.com/keys), or a local [Ollama](https://ollama.com) instance.\n\n## Development\n\n### Environment Variables\n\nCopy `.env.example` to `.env` for dev mode:\n\n```env\nVITE_OPENROUTER_API_KEY=sk-or-v1-...\nVITE_GROQ_API_KEY=gsk_...\n```\n\nKeys auto-load in development only. The `.env` file is git-ignored.\n\n### Scripts\n\n```bash\nbun run dev              # Chrome dev server\nbun run dev:firefox      # Firefox dev server\nbun run build            # Build for Chrome\nbun run build:firefox    # Build for Firefox\nbun run zip              # Chrome distribution zip\nbun run zip:firefox      # Firefox distribution zip\nbun run check            # Type checking\nbun run lint             # ESLint\nbun run lint:fix         # ESLint with auto-fix\nbun run format           # Prettier\nbun run format:check     # Check formatting\n```\n\n### Project Structure\n\n```\nsrc/\n├── entrypoints/\n│   ├── background.ts        # Service worker (API key injection)\n│   ├── content.ts           # Content script (input detection)\n│   └── popup/               # Extension popup UI (Svelte 5)\n├── lib/content/\n│   ├── api-client.ts        # Provider-aware API client with caching\n│   ├── config.ts            # Provider configurations\n│   ├── diff-engine.ts       # Text diff implementation\n│   ├── dom-utils.ts         # DOM utilities \u0026 icon positioning\n│   ├── state-manager.ts     # State management\n│   ├── types.ts             # TypeScript definitions\n│   └── ui-manager.ts        # UI manager\n├── styles/                  # Content script CSS\n└── assets/                  # Fonts \u0026 images\n```\n\n## Using with Ollama\n\nSafeTyper supports [Ollama](https://ollama.com) as a local, private provider — no API key needed.\n\n### Setup\n\n1. [Install Ollama](https://ollama.com/download) and pull a model (e.g. `ollama pull llama3.1`)\n2. Configure `OLLAMA_ORIGINS` to allow the browser extension to connect (see below)\n3. In the SafeTyper popup, select **Ollama** as the provider and pick your model\n\n### Configuring `OLLAMA_ORIGINS`\n\nBy default, Ollama only accepts requests from `localhost`. Browser extensions use a different origin (`chrome-extension://...` or `moz-extension://...`), so Ollama will block requests unless you allow it.\n\nSet `OLLAMA_ORIGINS` to `*` to allow all origins, or to your specific extension origin:\n\n**macOS:**\n\n```bash\nlaunchctl setenv OLLAMA_ORIGINS \"*\"\n```\n\nThen restart the Ollama application.\n\n**Linux (systemd):**\n\n```bash\nsudo systemctl edit ollama\n```\n\nAdd under `[Service]`:\n\n```ini\n[Service]\nEnvironment=\"OLLAMA_ORIGINS=*\"\n```\n\nThen reload and restart:\n\n```bash\nsudo systemctl daemon-reload\nsudo systemctl restart ollama\n```\n\n**Windows:**\n\nSet `OLLAMA_ORIGINS` as a system environment variable to `*`, then restart Ollama.\n\n**Running from the terminal (any OS):**\n\n```bash\nOLLAMA_ORIGINS=\"*\" ollama serve\n```\n\n### Custom Endpoint\n\nThe default endpoint is `http://localhost:11434`. If your Ollama instance runs on a different host or port, you can change it in the extension popup under the Ollama provider settings.\n\n## CI/CD\n\nAutomated publishing via GitHub Actions:\n\n- **Chrome Web Store** — triggered on version tags (`v*.*.*`) or manual dispatch\n- **Firefox Add-ons (AMO)** — triggered on version tags (`v*.*.*`) or manual dispatch\n\nBoth workflows run lint, format check, and type checking before building. See `.env.example` for required secrets.\n\n## Tech Stack\n\n[WXT](https://wxt.dev) · [Svelte 5](https://svelte.dev) · TypeScript · ESLint · Prettier\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoollabsio%2Fsafetyper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoollabsio%2Fsafetyper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoollabsio%2Fsafetyper/lists"}