# Language Tool - Spell & Grammar Checker for Raycast

URL: https://www.raycast.com/lucastaonline/raycast-language-tool

> Check spelling and grammar in many languages with LanguageTool, review corrections, and replace selected text or paste the fixed version.

- Install: raycast://extensions/lucastaonline/raycast-language-tool
- Author: [Baiano](https://www.raycast.com/lucastaonline)
- Installs: 1,386
- Platforms: macOS, Windows
- Categories: Communication
- Updated: 2026-11-20
- Source: https://github.com/raycast/extensions/tree/e38232e713cc42a58cac81b8d3af9261fd1624e5/extensions/language-tool/

## Commands

- **Check Text**: Check a text with LanguageTool for possible style and grammar issues.
- **Check Text Instant**: Check a text with LanguageTool using the clipboard content and paste the result instantly. The language is detected automatically.
- **Check Selected Text**: Check the selected text, review each correction with the result in view, then replace the selection.

## README

### LanguageTool for Raycast ✨

> Instant spelling and grammar correction using LanguageTool API. Get real-time suggestions and improve your text quality in multiple languages.

#### 🚀 Features

- ✅ **Check Text** - Interactive form with detailed results and corrections
- ⚡ **Check Text Instant** - Quick selected text or clipboard check and paste (background mode)
- 📝 **Check Selected Text** - Check what you have selected anywhere, review every correction, then replace it
- 🌍 **30+ Languages** - Auto-detection or manual selection
- 🎯 **Smart Sorting** - Most used languages appear first (frecency-based)
- 💾 **Persistent Settings** - Your preferred language is remembered
- 🔧 **Advanced Options** - Fine-tune checks with rules, categories, and levels
- 👑 **Premium Support** - Automatic integration with LanguageTool Premium accounts
- 📊 **Detailed Results** - View all issues with suggestions and context
- 🎨 **Modern UI** - Clean interface with Raycast's native components

#### 📦 Installation

##### From Raycast Store (Recommended)

1. Open Raycast
2. Search for "Store"
3. Find "LanguageTool"
4. Click "Install"

##### Manual Installation

```bash
# Clone the repository
git clone https://github.com/raycast/extensions.git
cd extensions/extensions/language-tool

# Install dependencies
npm install

# Development mode
npm run dev

# Build for production
npm run build
```

#### 🎯 Usage

##### Check Text (Interactive)

1. Open Raycast (⌘Space)
2. Type "Check Text"
3. Select language
4. Type or paste your text
5. Press Enter
6. Review results and apply corrections

**Keyboard Shortcuts:**
- `⌘↵` - Apply all corrections and paste
- `⌘⇧A` - Apply all corrections
- `⌘R` - Reset corrections
- `⌘C` - Copy corrected text

##### Check Text Instant (Background)

1. Select text or copy to clipboard
2. Open Raycast
3. Type "Check Text Instant"
4. ✨ Corrected text is automatically pasted!

**Note:** The command prioritizes selected text over clipboard content. If no text is selected, it uses the clipboard.

Perfect for quick corrections while writing emails, documents, or messages.

##### Check Selected Text (Review, Then Replace)

1. Select text in any application
2. Open Raycast and type "Check Selected Text"
3. Read the corrected text, with every change marked in place
4. Press `↵` to replace the selection

Every correction starts out applied. To go through them one at a time, press `⌘R`
for the corrections list: `↵` switches a correction off and on, the sidebar offers
the other replacements LanguageTool suggests, and `⌘↵` replaces the selection from
there.

**Keyboard Shortcuts:**
- `↵` - Replace the selection with the corrected text
- `⌘R` - Review the corrections one by one
- `⌘L` - Check in a different language
- `⌘⇧R` - Read the selection again and check it afresh
- `⌘⇧C` - Copy the corrected text

**Note:** Like Check Text Instant, it falls back to the clipboard when nothing is
selected. Raycast can reopen the command showing the previous run — `⌘⇧R`, or the
**Check again** button in the sidebar, picks up what is selected now.

#### ⚙️ Configuration

##### Basic Setup

Open Raycast Settings → Extensions → LanguageTool

**No configuration required** - works out of the box with free API!

##### Premium Setup (Optional)

For faster checks and higher limits:

1. Create account at [languagetool.org](https://languagetool.org)
2. Get API key from [Access Tokens](https://languagetool.org/editor/settings/access-tokens)
3. Configure in Raycast:
   - **Username/Email**: your@email.com
   - **API Key**: your-api-key

##### Advanced Options

Enable advanced features in settings:

- ☑️ **Show Advanced Options**

Then configure:
- **Check Level**: Default or Picky (stricter for formal text)
- **Mother Tongue**: Native language for false friends detection
- **Preferred Variants**: Language variants (e.g., en-GB, en-US)
- **Rules & Categories**: Enable/disable specific checks

📖 [Read the Advanced Options Guide](https://github.com/raycast/extensions/raw/e38232e713cc42a58cac81b8d3af9261fd1624e5/extensions/language-tool//ADVANCED_OPTIONS.md)

#### 🌍 Supported Languages

**30+ languages** including:

| Language | Code | Variants |
|----------|------|----------|
| English | `en` | US, GB, CA, AU, NZ, ZA |
| Portuguese | `pt` | BR, PT, AO, MZ |
| Spanish | `es` | ES, AR, MX, and more |
| German | `de` | DE, AT, CH |
| French | `fr` | - |
| Italian | `it` | - |
| Dutch | `nl` | - |
| Russian | `ru` | - |
| Chinese | `zh` | - |
| Japanese | `ja` | - |

And many more! Use `auto` for automatic detection.

#### 💡 Tips & Tricks

##### 1. Frecency Sorting
Languages you use most frequently automatically appear at the top of the list. No manual sorting needed!

##### 2. Keyboard Shortcuts
Learn the shortcuts for faster workflow:
- `⌘↵` to apply all and paste instantly
- Use arrow keys to navigate corrections

##### 3. Background Mode
Use "Check Text Instant" for quick corrections without opening UI. Perfect for:
- Quick email fixes
- Social media posts
- Chat messages

##### 4. Picky Mode
Enable "Picky" level in advanced options for:
- Academic papers
- Professional emails
- Formal documents
- Business presentations

##### 5. False Friends Detection
Set your mother tongue to detect common translation mistakes:
```
Text: "I am embarrassed" (English)
Mother Tongue: Portuguese
→ Detects potential confusion with "embaraçada"
```

#### 🏗️ Architecture

```
src/
├── check-text.tsx                # Main command (interactive form)
├── check-text-instant.tsx        # Background command (clipboard)
├── check-selected-text.tsx       # Selection command (review, then replace)
├── components/                   # React components
│   ├── check-text-result.tsx    # Results screen orchestrator
│   ├── result-metadata.tsx      # Results metadata display
│   ├── result-actions.tsx       # Action panel with shortcuts
│   └── corrections-list.tsx     # Correction-by-correction review
├── hooks/                        # React hooks
│   ├── use-text-corrections.ts  # Corrections state management
│   ├── use-correction-choices.ts # Replacement chosen per correction
│   └── use-selected-text-check.ts # Reads the selection and checks it
├── services/                     # Business logic
│   └── languagetool-api.ts      # API client (Premium support)
├── utils/                        # Pure functions
│   ├── text-correction.ts       # Text correction algorithms
│   ├── match-filter.ts          # Drops unusable and overlapping matches
│   ├── match-display.ts         # Marks corrections in the rendered text
│   └── replace-selection.ts     # Pastes over the selection
├── config/                       # Configuration
│   └── api.ts                   # API endpoints and limits
└── types.ts                     # TypeScript types
```

**Design Principles:**
- ✅ Separation of concerns
- ✅ Pure functions for business logic
- ✅ Reusable hooks and components
- ✅ Type-safe with TypeScript
- ✅ No external API client libraries needed

#### 📊 API Limits

##### Free Tier
- 20 requests/minute
- 75,000 characters/minute
- 20,000 characters/request

##### Premium Tier
- 80 requests/minute
- 300,000 characters/minute
- 60,000 characters/request

💡 Configure your Premium credentials in settings for higher limits!

#### 🛠️ Development

```bash
# Install dependencies
npm install

# Development mode (hot reload)
npm run dev

# Type checking
npm run lint

# Build for production
npm run build

# Publish to Raycast Store
npm run publish
```

##### Tech Stack
- **Raycast API** - Native Raycast integration
- **React** - UI components
- **TypeScript** - Type safety
- **LanguageTool API** - Grammar checking

#### 🤝 Contributing

Contributions are welcome! Please:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

#### 📝 License

MIT License - see [LICENSE](https://github.com/raycast/extensions/raw/e38232e713cc42a58cac81b8d3af9261fd1624e5/extensions/language-tool//LICENSE) file for details.

#### 🙏 Acknowledgments

- [LanguageTool](https://languagetool.org) - Amazing open-source grammar checker
- [Raycast](https://raycast.com) - The best launcher for macOS
- All contributors and users of this extension

#### 🐛 Issues & Support

Found a bug or have a suggestion?

- 🐛 [Report an issue](https://github.com/raycast/extensions/issues)
- 💬 [Join the Raycast Community](https://raycast.com/community)

#### 🔗 Links

- [Raycast Store](https://raycast.com/store)
- [LanguageTool API Docs](https://languagetool.org/http-api/)
- [GitHub Repository](https://github.com/raycast/extensions/tree/main/extensions/language-tool)

---

Made with ❤️ by [lucastaonline](https://github.com/lucastaonline)
