A fast Chrome extension + tiny FastAPI server that:
- Summarizes any web page.
- Auto-detects YouTube videos, fetches transcripts, and gives clean chapter-style notes.
- Translates summaries to EN/DE/KN/ES (and more).
- Works locally. Uses Gemini if you add an API key. Falls back to a lightweight local summarizer if not.
🧩 Extension Zip: Download from here.
- Features
- Architecture
- Quick Start
- Create
.env(Gemini) - Install the Extension
- Use It
- API (for hackers)
- Troubleshooting
- Privacy
- Roadmap
- License
- ✅ One-click Summarize for any tab
- ✅ YouTube-aware: pulls transcript and produces chapter-style bullets
- ✅ Separate prompts for YouTube vs Websites for better results
- ✅ Translate into common languages
- ✅ Open in Tab viewer with clean typography and print/PDF
- ✅ Everything talks to
http://localhost:8080
[Chrome Extension (MV3)]
├─ popup.html/js → calls local FastAPI
├─ content.js → extracts visible page text or YouTube videoId
└─ background.js → context menu, defaults
[FastAPI Server]
├─ /summarize → uses Gemini (if key) or local fallback
├─ /translate → optional translation via Gemini
└─ YouTube → robust transcript fetcher (manual → auto)
git clone https://github.com/sushant097/tabgist-chrome
cd tabgist-chrome
python -m venv .venv
# macOS/Linux
source .venv/bin/activate
# Windows PowerShell
# .\.venv\Scripts\Activate.ps1
pip install -U pip
pip install -r requirements.txtuvicorn app:app --reload --host 127.0.0.1 --port 8080Check:
http://127.0.0.1:8080/→ returns{ ok, use_gemini, version }http://127.0.0.1:8080/health(if you add one) →{"ok": true}
Create a file named .env in server/:
GEMINI_API_KEY=your_google_generative_ai_key_here
- If set, the server uses Gemini 1.5 Flash for better summaries and real translation.
- If not set, the server still works with a small local summarizer. Translation will show a helpful placeholder.
Find the extension in: /extension/tabgist_chrome_extension.zip
- Unzip it anywhere.
- Open Chrome → go to
chrome://extensions - Toggle Developer mode (top right)
- Click Load unpacked → select the unzipped extension folder
- Pin the extension icon
- In the popup, set Server to
http://localhost:8080if it isn’t already
Permissions used
activeTab,scripting,tabs(to read the current page via content script)storage(to remember server URL)contextMenus(optional quick action)
Tip: To summarize local files, open the extension Details and enable “Allow access to file URLs.”
-
Start the server (
uvicorn …above). -
Open any article page → click Summarize.
-
Open a YouTube video (
watch,shorts, oryoutu.be) → Summarize:- The extension sends
videoId. - The server fetches transcript and applies a YouTube-specific prompt.
- The extension sends
-
Choose a Target language and click Translate.
-
Use Open in Tab for a large, printable view.
The popup renders Markdown-ish bullets as clean HTML. Your full-page viewer supports Copy and Print/PDF.
Body
{
"tab": {
"url": "https://example.com",
"title": "Page Title",
"isYouTube": false,
"videoId": null,
"text": "Visible page text…"
},
"options": {
"target_lang": "en",
"style": "bullet"
}
}Response
{ "pretty": "• Bullet one\n• Bullet two\n\n**TL;DR** ..." }- If
isYouTubeis true andvideoIdexists, the server uses the YouTube transcript and a YouTube-specific prompt. stylecan bebullet,tldr, ornotes(server maps this inside the prompt).
Same body. Translates tab.text or YouTube transcript.
If Gemini is unavailable, returns a friendly placeholder and a snippet.
Popup says “Could not establish connection. Receiving end does not exist.”
- The content script is not injected. We inject it on demand, but you must be on a normal page (starts with
http(s)://orfile://). - Restricted pages (Chrome Web Store,
chrome://*, PDFs) cannot be injected.
Service worker registration failed
- Reload the extension in
chrome://extensions. - Ensure
background.jsis present and there are no syntax errors. - Check permissions include
contextMenusandtabs.
YouTube: “No text found to summarize. (YouTube transcript: …)”
- Some videos disable transcripts or don’t have them yet.
- We try manual English first, then auto. You’ll see a clear reason like
TranscriptsDisabledorNoTranscriptFound.
“Gemini unavailable”
- Create
.envwithGEMINI_API_KEY=... - Restart the server. Home endpoint should show
"use_gemini": true.
Port already in use
uvicorn app:app --reload --host 127.0.0.1 --port 9090Update the Server field in the popup to match.
File URLs
- In extension Details, enable Allow access to file URLs.
- The extension talks only to your machine at
http://localhost. - Page text and transcripts are processed locally and, if you enable Gemini, sent to Google’s API for generation.
- Your API key lives in
.env. Do not commit it.
- Side panel UI for persistent notes
- Timestamped chapters (
00:00 Intro,02:15 Topic A) using transcriptstarttimes - Export to Markdown, Notion, or Google Docs
- Deploy server into cloud.
- Custom prompt editor in Options
- More languages and styles
MIT. See LICENSE.
Built with ❤️ using Chrome MV3, FastAPI, and optional Gemini.
Questions or ideas? Open an issue or a PR.
