{"id":45681326,"url":"https://github.com/maximbilan/grammr","last_synced_at":"2026-02-24T14:42:05.560Z","repository":{"id":338303166,"uuid":"1142427282","full_name":"maximbilan/grammr","owner":"maximbilan","description":"Blazingly fast TUI grammar checker powered by AI","archived":false,"fork":false,"pushed_at":"2026-02-13T20:20:36.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-14T03:28:32.339Z","etag":null,"topics":["ai","english","go","grammar"],"latest_commit_sha":null,"homepage":"","language":"Go","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/maximbilan.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-26T11:55:59.000Z","updated_at":"2026-02-13T20:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maximbilan/grammr","commit_stats":null,"previous_names":["maximbilan/grammr"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/maximbilan/grammr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2Fgrammr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2Fgrammr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2Fgrammr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2Fgrammr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximbilan","download_url":"https://codeload.github.com/maximbilan/grammr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2Fgrammr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29786253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"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","english","go","grammar"],"created_at":"2026-02-24T14:42:03.942Z","updated_at":"2026-02-24T14:42:05.551Z","avatar_url":"https://github.com/maximbilan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grammr\n\n\u003e Lightning-fast AI grammar checker in your terminal ⚡\n\n**grammr** (yes, it's misspelled on purpose) is a blazingly fast TUI grammar checker powered by OpenAI or Anthropic Claude. Copy text from anywhere, fix it in seconds, and paste it back. No UI, no bloat, just speed.\n\n## Why grammr?\n\n- **Fast**: Sub-3-second workflow from copy to paste\n- **Keyboard-only**: Vim-inspired keybindings\n- **AI-powered**: GPT-4o and Claude quality beats rule-based checkers\n- **Translation**: Built-in AI translation to any language\n- **Offline cache**: Already-checked text loads instantly\n- **Beautiful**: Colorful diffs, clean interface\n- **Private**: Runs locally, API calls only for corrections\n\n## Install\n\n### Homebrew (macOS)\n\n**Option 1: Direct installation (recommended)**\n\n```bash\nbrew tap maximbilan/grammr https://github.com/maximbilan/grammr\nbrew install grammr\n```\n\n**Option 2: Using the installation script**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/maximbilan/grammr/main/install.sh | bash\n```\n\nOr for a specific version:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/maximbilan/grammr/main/install.sh | bash -s v1.0.0\n```\n\n**Option 3: Direct formula URL**\n\n```bash\nbrew install --build-from-source https://raw.githubusercontent.com/maximbilan/grammr/v1.0.0/Formula/grammr.rb\n```\n\nReplace `v1.0.0` with the desired version tag.\n\n### Go Install\n\n```bash\ngo install github.com/maximbilan/grammr@latest\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/maximbilan/grammr\ncd grammr\ngo build -o grammr\n```\n\n## Setup\n\n1. Get an API key from [OpenAI](https://platform.openai.com/api-keys) or [Anthropic](https://console.anthropic.com/)\n2. Initialize configuration (optional, creates config directory):\n```bash\ngrammr config init\n```\n\n3. Configure grammr:\n\n**For OpenAI:**\n```bash\ngrammr config set provider openai\ngrammr config set api_key YOUR_OPENAI_API_KEY\n```\n\n**For Anthropic Claude:**\n```bash\ngrammr config set provider anthropic\ngrammr config set anthropic_api_key YOUR_ANTHROPIC_API_KEY\n```\n\nOptional: Choose a model (default: gpt-4o for OpenAI, claude-3-5-sonnet-20241022 for Anthropic)\n```bash\ngrammr config set model gpt-4o-mini  # OpenAI: Faster and cheaper\ngrammr config set model claude-3-5-sonnet-20241022  # Anthropic: Latest Claude model\n```\n\nOptional: Set language (default: english)\n```bash\ngrammr config set language spanish  # For Spanish text correction\n```\n\nOptional: Enable translation to a target language\n```bash\ngrammr config set translation_language french  # Translate corrected text to French\n```\n\n## Usage\n\n1. Copy text from anywhere (Cmd+C / Ctrl+C)\n2. Run `grammr`\n3. Press `V` to paste\n4. Wait ~1s for AI correction\n5. Press `C` to copy result\n6. Paste back to your app (Cmd+V / Ctrl+V)\n\nThat's it! 🎉\n\n### Keyboard Shortcuts\n\n**Global Mode:**\n| Key | Action |\n|-----|--------|\n| `V` | Paste from clipboard |\n| `C` | Copy corrected text |\n| `T` | Copy translation (if translation enabled) |\n| `E` | Edit corrected text |\n| `O` | Edit original text |\n| `R` | Retry correction |\n| `D` | Toggle diff view |\n| `A` | Review changes word-by-word |\n| `Q` | Quit |\n| `Ctrl+V` | Paste \u0026 auto-correct |\n| `Ctrl+C` | Copy \u0026 quit |\n| `?` or `F1` | Show help |\n\n**Edit Mode:**\n| Key | Action |\n|-----|--------|\n| `Esc` | Exit edit mode |\n| `Ctrl+S` | Save and re-correct (original only) |\n\n**Review Mode:**\n| Key | Action |\n|-----|--------|\n| `Tab` | Apply current change |\n| `Space` | Skip current change |\n| `Esc` | Exit review mode |\n\n### Styles\n\nSwitch correction styles:\n- `1` - Casual (default)\n- `2` - Formal\n- `3` - Academic\n- `4` - Technical\n\n## Configuration\n\nEdit `~/.grammr/config.yaml`:\n```yaml\nprovider: \"openai\"  # or \"anthropic\"\napi_key: \"sk-...\"  # OpenAI API key\nanthropic_api_key: \"sk-ant-...\"  # Anthropic API key (if using Anthropic)\nmodel: \"gpt-4o\"  # OpenAI: gpt-4o, gpt-4o-mini | Anthropic: claude-3-5-sonnet-20241022, claude-3-opus-20240229, etc.\nstyle: \"casual\"  # or use \"mode\" for backward compatibility\nlanguage: \"english\"  # Default: english. Options: english, spanish, french, german, etc.\ntranslation_language: \"\"  # Optional: Translate corrected text to this language (e.g., \"spanish\", \"french\", \"german\")\ncache_enabled: true\ncache_ttl_days: 7\nshow_diff: true\nauto_copy: false\n```\n\nOr use the CLI:\n```bash\ngrammr config set provider anthropic\ngrammr config set anthropic_api_key sk-ant-...\ngrammr config set model claude-3-5-sonnet-20241022\ngrammr config set language spanish\ngrammr config set translation_language french\ngrammr config get provider\ngrammr config get language\ngrammr config get translation_language\n```\n\n## Model Comparison\n\n### OpenAI Models\n| Model | Speed | Cost | Quality |\n|-------|-------|------|---------|\n| gpt-4o | Fast | Medium | Excellent |\n| gpt-4o-mini | Very Fast | Cheap | Very Good |\n\n### Anthropic Models\n| Model | Speed | Cost | Quality |\n|-------|-------|------|---------|\n| claude-3-5-sonnet-20241022 | Fast | Medium | Excellent |\n| claude-3-opus-20240229 | Medium | High | Excellent |\n| claude-3-haiku-20240307 | Very Fast | Cheap | Very Good |\n\n**Recommendation**: \n- **OpenAI**: Start with `gpt-4o-mini` for speed and cost, upgrade to `gpt-4o` if you need better quality.\n- **Anthropic**: Start with `claude-3-5-sonnet-20241022` for the best balance, use `claude-3-haiku-20240307` for speed/cost, or `claude-3-opus-20240229` for maximum quality.\n\n## Examples\n\n**Quick fix:**\n```bash\ngrammr\n# Press V, wait, press C\n```\n\n**Change style:**\n```bash\n# Press 2 for formal writing\n# Press V to paste\n```\n\n**Review changes word-by-word:**\n```bash\ngrammr\n# Press V to paste\n# Press A to enter review mode\n# Press Tab to apply changes, Space to skip\n# Press Esc when done\n```\n\n**Use translation:**\n```bash\n# First, configure translation language\ngrammr config set translation_language spanish\n\n# Then use grammr normally\ngrammr\n# Press V to paste\n# After correction completes, translation appears automatically\n# Press T to copy translation\n```\n\n**Clear cache:**\n```bash\nrm -rf ~/.grammr/cache/\n```\n\n**Initialize config:**\n```bash\ngrammr config init\n```\n\n## Features\n\n- ✅ Real-time streaming corrections\n- ✅ AI-powered translation to any language\n- ✅ Smart caching (hash-based, configurable TTL)\n- ✅ Beautiful colored diffs\n- ✅ Word-by-word change review mode\n- ✅ Multiple writing modes (casual, formal, academic, technical)\n- ✅ Inline text editing\n- ✅ Vim-inspired keybindings\n- ✅ Cross-platform (macOS, Linux, Windows)\n- ✅ Single binary, no dependencies\n- ✅ Comprehensive test suite\n\n## Why the weird name?\n\nBecause a grammar checker with a misspelled name is hilariously ironic. Also, it's shorter to type. 😄\n\n## Development\n\n### Running Tests\n\n```bash\ngo test ./...\n```\n\n### Building\n\n```bash\ngo build -o grammr\n```\n\n### Test Coverage\n\nThe project includes comprehensive unit tests covering:\n- Cache operations (hash, get, set, expiration)\n- Configuration management (load, save, set, get)\n- Corrector initialization and prompt building\n- UI utility functions (diff parsing, text building, whitespace trimming)\n\n## Roadmap\n\n- [x] Support for Anthropic Claude (in addition to OpenAI)\n- [ ] Custom system prompts\n- [ ] Plugin system for custom corrections\n- [ ] Batch file processing\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nSee LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximbilan%2Fgrammr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximbilan%2Fgrammr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximbilan%2Fgrammr/lists"}