Gemini Assistant

unlisted

by Saša Mitrović

Improve your writing with Google Gemini AI — grammar, style, content, and more.

Updated 23d agoMIT
View on GitHub

Gemini Assistant for Obsidian

TypeScript Obsidian License: MIT

Improve your writing with Google Gemini AI — grammar, style, content, and more — directly inside Obsidian. No context switching, no copy-pasting into external tools.

Features

  • Check Grammar & Spelling — Fix grammar, punctuation, and spelling errors with explanations of each change
  • Improve Writing Style — Rephrase for clarity, flow, and readability while keeping your voice
  • Expand Content — Get suggestions for additional points, arguments, and details
  • Summarize — Generate a concise 2–4 sentence summary of any text
  • Translate — Translate text to any language (configurable default)
  • Generate Title & Headings — Get a compelling title and section headings for your note
  • Custom Prompt — Send any free-form instruction to Gemini with your text

Additional Features

  • Sidebar Panel — AI responses rendered in a dedicated right-side panel with full Markdown support
  • Suggestion Modal — Side-by-side view of original vs. suggestion with Accept, Reject, and Copy buttons
  • Accept & Replace — One click to replace your selected text with the AI suggestion
  • Context-Aware — Commands use the full note as context while acting on your selection
  • Works on mobile — Compatible with both desktop and mobile Obsidian

Model Support

The plugin dynamically fetches all available Gemini models directly from the Google API:

  • Auto-discovery — Click "Refresh Models" in settings to load the latest available Gemini models
  • Smart filtering — Only text generation models are shown (embedding, TTS, and other non-text models are excluded)
  • Persistent cache — The fetched model list is saved between sessions so you don't need to refresh every time
  • Offline fallback — If the API is unavailable or no API key is set, the plugin falls back to a curated list of current stable models

The default model is gemini-2.5-flash, which provides a good balance of speed and quality.

Installation

Manual Installation

  1. Download main.js and manifest.json from the latest release
  2. Create a folder obsidian-gemini-assistant inside your vault's .obsidian/plugins/ directory
  3. Copy main.js and manifest.json into that folder
  4. Open Obsidian Settings → Community Plugins → Reload → Enable "Gemini Assistant"

Install via BRAT

  1. Install BRAT from Community Plugins
  2. Open BRAT settings → "Add Beta Plugin"
  3. Enter: sashamitrovich/obsidian-gemini-assistant
  4. Enable the plugin in Community Plugins

Getting a Gemini API Key

  1. Go to Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the key and paste it into the plugin settings

The API key is stored securely using Obsidian's built-in plugin data storage and is never logged or transmitted anywhere other than Google's API.

Usage

Running Commands

  1. Select text in any note (or leave nothing selected to process the entire note)
  2. Open the Command Palette (Ctrl/Cmd + P)
  3. Search for "Gemini Assistant" and pick a command
  4. Results appear in the sidebar panel and a suggestion modal
  5. In the modal, click Accept & Replace to insert the AI text, Copy to copy it, or Reject to dismiss

Available Commands

CommandPalette NameDescription
GrammarGemini Assistant: Check Grammar & SpellingFix errors and list changes
StyleGemini Assistant: Improve Writing StyleImprove clarity and flow
ExpandGemini Assistant: Expand ContentAdd depth and detail
SummarizeGemini Assistant: SummarizeCondense to 2–4 sentences
TranslateGemini Assistant: TranslateTranslate to configured language
HeadingsGemini Assistant: Generate Title & HeadingsSuggest title + section headings
CustomGemini Assistant: Custom PromptFree-form instruction

Ribbon Icon

Click the sparkles icon in the left ribbon to open the Gemini Assistant sidebar panel.

Settings

SettingDescriptionDefault
Gemini API KeyYour Google Gemini API key
ModelAll available Gemini models (dynamically fetched)gemini-2.5-flash
TemperatureControls randomness (0.0 = deterministic, 1.0 = creative)0.7
Max TokensMaximum length of AI responses2048
Default Translation LanguageTarget language for the Translate commandEnglish
Custom System PromptInstructions prepended to all AI requests
Show Ribbon IconToggle the sidebar icon in the left ribbonOn

Screenshots

Coming soon

Development

# Clone the repository
git clone https://github.com/sashamitrovich/obsidian-gemini-assistant.git
cd obsidian-gemini-assistant

# Install dependencies
npm install

# Build for production
npm run build

# Start development mode (auto-rebuild on changes)
npm run dev

To test locally, symlink or copy the built files into your vault's .obsidian/plugins/obsidian-gemini-assistant/ directory.

Contributing

Contributions are welcome! Please:

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

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.