Skip to content

πŸš€ Instantly fix grammar, vocabulary, and style with Alt+D β€” A powerful Chrome extension powered by Groq AI. Select any text, press your shortcut, and watch it transform. 15+ tone presets, smart model fallback, works everywhere. Privacy-first, no tracking. ✨

License

Notifications You must be signed in to change notification settings

melancholic-ksm/altd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt-D Smart Fix ✨

Alt-D Logo Version License Chrome

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

Features β€’ Installation β€’ Usage β€’ Configuration β€’ Privacy β€’ Contributing β€’ License


🎯 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

  • πŸš€ Instant fixes β€” Select text, press Alt+D, done!
  • πŸ€– Multiple AI models β€” GPT-OSS 120B, Llama 3.3 70B, Qwen3 32B, Kimi K2, and more
  • 🎨 15+ tone presets β€” Formal, casual, friendly, academic, playful, and more
  • πŸ”’ Privacy-first β€” Your API key and text never leave your browser
  • ⚑ Smart fallback β€” Automatically tries larger models if one fails
  • 🌐 Works everywhere β€” Gmail, Twitter/X, LinkedIn, Google Docs, Slack, Discord, and any website

🌟 Features

Core Functionality

Feature Description
One-Key Fix Select text β†’ Press Alt+D β†’ Text is fixed instantly
Universal Support Works in inputs, textareas, contenteditable, and rich text editors
Smart Context Sends surrounding context to AI for better understanding
Inline Replacement Fixes are applied directly where you're typing
Toast Notifications Visual feedback for success, errors, and progress

AI & Models

Feature Description
Dynamic Model List Auto-fetches available models from Groq API
Smart Fallback If a model fails, automatically tries the next largest model
Model Priority Sorts models by parameter size (120B β†’ 70B β†’ 32B β†’ 8B)
Cached Models 1-hour cache to reduce API calls
Manual Refresh Force-refresh model list anytime

Customization

Feature Description
15+ Tone Presets Formal, Friendly, Concise, Playful, Academic, Casual, Persuasive, Empathetic, Confident, Creative, Technical, Enthusiastic, Neutral, Diplomatic
3 Custom Tones Create your own tone instructions
Tone Preview See exactly what prompt is sent to the AI
Target Modes Toggle Grammar, Vocabulary, and Custom fixes
Temperature Control Adjust AI creativity (0.0 - 1.0)

User Experience

Feature Description
Floating Panel Draggable status panel with minimize option
Disable Options Disable for current page, entire site, or timed duration
Auto-Save Settings Changes are saved automatically as you type
Setup Tutorial Interactive guide for first-time setup
Keyboard Shortcuts Fully 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

    • Open Chrome and navigate to chrome://extensions
    • Enable Developer mode (toggle in top-right)
    • Click Load unpacked
    • Select the altd folder
  3. Set up keyboard shortcut

    • Go to chrome://extensions/shortcuts
    • Find "Alt-D Smart Fix"
    • Click the pencil icon next to "Fix selected text"
    • Press Alt + D (or your preferred shortcut)
  4. Get your Groq API key

    • Visit console.groq.com
    • Create a free account
    • Generate an API key
    • Paste it in Alt-D settings

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

Before After (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:

  • Current status (Contacting model, processing, etc.)
  • Model name and parameter size
  • Minimize button with disable options

Panel Controls:

  • Double-click anywhere β€” Enable drag mode
  • Click minimize (βˆ’) β€” Show disable options
  • Disable for page β€” Disable on current URL
  • Disable for site β€” Disable on entire domain
  • Disable for time β€” Disable for 15min/1hr/8hr

βš™οΈ Configuration

Settings Page

Access settings via:

  • Click the Alt-D extension icon β†’ βš™οΈ Settings
  • Or right-click the icon β†’ Options

Available Settings

API Configuration

Setting Description Default
Groq API Key Your personal API key from Groq Required
Model AI model to use GPT-OSS 120B
Temperature Creativity level (0 = precise, 1 = creative) 0.15

Fix Targets

Setting Description Default
Grammar Fix grammatical errors βœ… Enabled
Vocabulary Improve word choice βœ… Enabled
Custom Apply tone/style instructions βœ… Enabled

Tone Presets

Standard Tones:

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

Professional Tones:

  • Academic β€” Scholarly, precise language
  • 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

Custom Tones:

  • Custom 1-3 β€” Define your own instructions

πŸ—οΈ Project Structure

altd/
β”œβ”€β”€ manifest.json           # Chrome extension manifest (MV3)
β”œβ”€β”€ README.md               # This file
β”œβ”€β”€ 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
    β”‚
    β”œβ”€β”€ tutorial.html       # Setup tutorial page
    β”œβ”€β”€ tutorial.js         # Tutorial navigation
    β”œβ”€β”€ tutorial.css        # Tutorial styles
    β”‚
    β”œβ”€β”€ privacy.html        # Privacy policy page
    β”œβ”€β”€ privacy.css         # Privacy page styles
    β”‚
    └── assets/             # Images for tutorial
        β”œβ”€β”€ find-extension.png
        β”œβ”€β”€ set-shortcut.png
        β”œβ”€β”€ groq-signup.png
        β”œβ”€β”€ create-api-key.png
        β”œβ”€β”€ copy-api-key.png
        └── paste-api-key.png

πŸ”Œ 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

Permission Reason
storage Save settings and API key locally
scripting Inject content script for text selection
activeTab Access 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:

  • βœ… Local Storage Only β€” API key stored in chrome.storage.local, never synced
  • βœ… No Tracking β€” Zero analytics, telemetry, or user tracking
  • βœ… No Logs β€” Text is never logged or stored
  • βœ… Direct API Calls β€” Text goes directly to Groq, no intermediary servers
  • βœ… Open Source β€” Full transparency, audit the code yourself

πŸ“„ Read Full Privacy Policy


🀝 Contributing

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

Bug Reports & Feature Requests

  1. Check existing issues
  2. Create a new issue with:
    • Clear description
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior
    • Screenshots if applicable

Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. 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

πŸ“‹ Roadmap

  • History Panel β€” Undo/redo previous fixes
  • Streaming Responses β€” Faster perceived latency
  • Per-Site Overrides β€” Custom settings for specific sites
  • Context Menu β€” Right-click to fix text
  • Multiple Languages β€” Support for non-English text
  • Chrome Web Store β€” Official release

❓ FAQ

Why isn't Alt+D working?

Chrome may reserve Alt+D for the omnibox (address bar). Go to chrome://extensions/shortcuts and:

  1. Find "Alt-D Smart Fix"
  2. 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.


πŸ“„ 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.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ™ Acknowledgments

  • Groq β€” For providing fast, free AI inference
  • Chrome Extensions β€” MV3 documentation
  • All contributors and users!

Made with ❀️ by melancholic-ksm

⭐ Star this repo if you find it useful!

Report Bug β€’ Request Feature β€’ Contribute

About

πŸš€ Instantly fix grammar, vocabulary, and style with Alt+D β€” A powerful Chrome extension powered by Groq AI. Select any text, press your shortcut, and watch it transform. 15+ tone presets, smart model fallback, works everywhere. Privacy-first, no tracking. ✨

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published