Alt-D Smart Fix ✨

A powerful Chrome extension that fixes grammar, vocabulary, and style with a single keyboard shortcut using AI.

Alt-D Smart Fix v0.1.0 MIT License Chrome MV3
View on GitHub Download .zip Get Groq API Key Setup Tutorial

🎯 What is Alt-D?

Alt-D Smart Fix is a Chrome extension that lets you select any text in any input field, textarea, or content-editable region, press Alt + D, and instantly rewrite it using state-of-the-art AI models from Groq.

Whether you're writing emails, crafting social media posts, coding documentation, or chatting — Alt-D helps you communicate more clearly and professionally in seconds.

✨ Key Highlights



🌟 Features

Core Functionality

FeatureDescription
One-Key FixSelect text → Press Alt+D → Text is fixed instantly
Universal SupportWorks in inputs, textareas, contenteditable, and rich text editors
Smart ContextSends surrounding context to AI for better understanding
Inline ReplacementFixes are applied directly where you're typing
Toast NotificationsVisual feedback for success, errors, and progress

AI & Models

FeatureDescription
Dynamic Model ListAuto-fetches available models from Groq API
Smart FallbackIf a model fails, automatically tries the next largest model
Model PrioritySorts models by parameter size (120B → 70B → 32B → 8B)
Cached Models1-hour cache to reduce API calls
Manual RefreshForce-refresh model list anytime

Customization

FeatureDescription
15+ Tone PresetsFormal, Friendly, Concise, Playful, Academic, Casual, Persuasive, Empathetic, Confident, Creative, Technical, Enthusiastic, Neutral, Diplomatic
3 Custom TonesCreate your own tone instructions
Tone PreviewSee exactly what prompt is sent to the AI
Target ModesToggle Grammar, Vocabulary, and Custom fixes
Temperature ControlAdjust AI creativity (0.0 - 1.0)

User Experience

FeatureDescription
Floating PanelDraggable status panel with minimize option
Disable OptionsDisable for current page, entire site, or timed duration
Auto-Save SettingsChanges are saved automatically as you type
Setup TutorialInteractive guide for first-time setup
Keyboard ShortcutsFully customizable via Chrome settings

📦 Installation

From Source (Developer Mode)

1. Clone the repository

git clone https://github.com/melancholic-ksm/altd.git
cd altd

2. Load in Chrome

3. Set up keyboard shortcut

4. Get your Groq API key

From Chrome Web Store

Coming soon!


🚀 Usage

Basic Usage

  1. Select text in any input field, textarea, or editable area
  2. Press Alt + D (or your configured shortcut)
  3. Watch the magic — your text is instantly improved!

Examples

BeforeAfter (Formal tone)
"i dont no how too fix grammer""I don't know how to fix grammar."
"plz send me the docs asap thx""Please send me the documents at your earliest convenience. Thank you."
"the meeting was gud we talked bout stuff""The meeting was productive. We discussed several important topics."

Floating Panel

When you trigger Alt-D, a floating panel appears showing:

Panel Controls:


⚙️ Configuration

Settings Page

Access settings via:

API Configuration

SettingDescriptionDefault
Groq API KeyYour personal API key from GroqRequired
ModelAI model to useGPT-OSS 120B
TemperatureCreativity level (0 = precise, 1 = creative)0.15

Fix Targets

SettingDescriptionDefault
GrammarFix grammatical errors✅ Enabled
VocabularyImprove word choice✅ Enabled
CustomApply tone/style instructions✅ Enabled

Tone Presets

Standard Tones

  • Default — No tone adjustment, just fix errors
  • Formal — Professional, business-appropriate
  • Friendly — Warm, approachable
  • Concise — Brief, to the point
  • Casual — Relaxed, conversational

Professional Tones

  • Academic — Scholarly, precise
  • Technical — Domain-specific terminology
  • Persuasive — Compelling, convincing
  • Diplomatic — Tactful, balanced
  • Neutral — Objective, impartial

Expressive Tones

  • Playful — Fun, witty
  • Enthusiastic — Energetic, excited
  • Creative — Vivid, imaginative
  • Empathetic — Compassionate, caring
  • Confident — Assertive, decisive

🏗️ Project Structure

altd/ ├── manifest.json # Chrome extension manifest (MV3) ├── README.md # Documentation ├── PRIVACY.md # Privacy policy ├── LICENSE # MIT License │ └── src/ ├── background.js # Service worker (API calls, model management) ├── contentScript.js # Selection capture, floating panel, text replacement │ ├── options.html # Settings page ├── options.js # Settings logic & auto-save ├── options.css # Settings styles │ ├── popup.html # Toolbar popup ├── popup.js # Popup logic └── popup.css # Popup styles External pages hosted at https://melancholic-ksm.github.io/altd: ├── index.html # Main documentation ├── tutorial.html # Setup tutorial └── privacy.html # Privacy policy

🔌 Technical Details

API Integration

Alt-D uses the Groq API for AI processing:

Endpoint: https://api.groq.com/openai/v1/chat/completions

Request Format:

{
  "model": "openai/gpt-oss-120b",
  "temperature": 0.15,
  "max_completion_tokens": 768,
  "messages": [
    {
      "role": "system",
      "content": "You are Alt-D, a precise text-editing assistant..."
    },
    {
      "role": "user", 
      "content": "[Selected text with context]"
    }
  ]
}

Smart Fallback System

When a model fails (404, rate limit, overloaded), Alt-D automatically tries the next model sorted by parameter size:

1. User's selected model
2. 120B models (GPT-OSS 120B)
3. 100B models (Kimi K2)
4. 70B models (Llama 3.3 70B)
5. 50B models (Compound)
6. 32B models (Qwen3 32B)
7. 20B models (GPT-OSS 20B)
8. 8B models (Llama 3.1 8B)

Permissions

PermissionReason
storageSave settings and API key locally
scriptingInject content script for text selection
activeTabAccess current tab for text replacement
<all_urls>Work on any website

🔒 Privacy

Your privacy is our priority. Alt-D is designed with privacy-first principles:

📄 Read Full Privacy Policy


❓ FAQ

Why isn't Alt+D working?

Chrome may reserve Alt+D for the omnibox (address bar). Go to chrome://extensions/shortcuts and set a different shortcut like Alt+Shift+D or Ctrl+Shift+D.

Is my API key safe?

Yes! Your API key is stored only in chrome.storage.local on your device. It's never synced to the cloud or sent anywhere except directly to Groq's API.

Which model should I use?

GPT-OSS 120B — Best quality, recommended default
Llama 3.3 70B — Fast and capable
Qwen3 32B — Good balance of speed and quality
Llama 3.1 8B — Fastest, good for quick fixes

Is Groq free?

Yes! Groq offers free API access with generous rate limits. No credit card required.

Does it work offline?

No, Alt-D requires an internet connection to communicate with Groq's API.


📋 Roadmap


🤝 Contributing

Contributions are welcome! Here's how you can help:

🐛 Bug Reports

  1. Check existing issues
  2. Create a new issue with clear description
  3. Include steps to reproduce
  4. Add screenshots if applicable

✨ Pull Requests

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/altd.git
cd altd

# Load in Chrome (see Installation)
# Make changes
# Test by reloading the extension

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

MIT License

Copyright (c) 2024 melancholic-ksm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

🙏 Acknowledgments