texpander-ai

AI-powered text expander with Gemini integration

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
quantavil
Daily installs
0
Total installs
1
Ratings
0 0 0
Version
3.0.0
Created
2026-02-25
Updated
2026-02-25
Size
56.8 KB
License
MIT
Applies to
All sites

Texpander AI

Texpander AI is a robust, Neo Zen-styled userscript that supercharges your typing experience across the web. It provides instant text expansion algorithms and integrates an AI model (Gemini 2.5 Flash Lite) for fast, context-aware text transformations like grammar fixing, summarizing, and expanding content.

This userscript is built with TypeScript and bundled using Vite.

Features

  • Text Expansion Palette (Alt + P): Define custom abbreviations (e.g., brb -> Be right back.) and trigger them globally.
  • AI Context Menu (Alt + G): Highlight text anywhere on the web, hit Alt+G, and instantly run AI prompts (Summarize, Fix Grammar, Make Formal) to manipulate your text. Supports custom API prompts.
  • Neo Zen UI: A beautifully clean, dark, and highly responsive user interface free of sluggish animations—engineered for immediate flow state.
  • Configurable Settings: Fully customize your AI preferences, API keys, and text expansion dictionary right in the browser.

Getting Started

Prerequisites

You will need a userscript manager installed in your browser:

Installation

Since this project is managed by Vite with the vite-plugin-monkey plugin, you can install the script locally while developing.

  1. Clone & Install Dependencies

    npm install
    
  2. Development Runs the Vite development server. Your userscript manager will typically pick up the local file, updating automatically as you make changes.

    npm run dev
    
  3. Build target Compile down to a single minified userscript file inside the dist/ directory.

    npm run build
    

Once built, you can drag and drop dist/texpander-ai.user.js into your userscript manager to install the production version of the extension.

Usage

  • Open the Text Expansion Palette: Alt + P
  • Open the AI Prompt Menu: Alt + G (Ideally, select some text before hitting this shortcut).

Adding your API Key: To use the AI text generation features, go to the settings panel (gear icon) in either menu and input your Google Gemini API Key.

Technology

  • TypeScript: Typed logic and configuration.
  • Vite & vite-plugin-monkey: Fast builds tailored specifically for userscript compilation and GM_* APIs.
  • Native Web Components: The UI renders directly into the DOM using pure vanilla JS and strictly scoped CSS for maximum compatibility avoiding heavy framework overhead scenarios.