A Chrome extension that acts as a critical thinking coach, powered by a small AI model that runs entirely on your device. No API keys, no accounts, no data leaving your browser.
Two builds exist. This repository is the on-device build (v0.8.0): a small Gemma model runs locally through WebLLM and WebGPU, so nothing you read leaves your browser. The Chrome Web Store listing is the earlier cloud build (v0.6.0), which analyzes articles with Google Gemini and needs your own Google AI Studio key. Both are free. Pick the tradeoff you want.
Perspective is a Chrome extension that enhances critical thinking by analyzing web articles with an AI model that runs entirely on your device. When you encounter an article online, Perspective can:
- Generate counterarguments and alternative viewpoints
- Detect logical fallacies in the reasoning (ad hominem, strawman, false dilemmas, etc.)
- Assess source credibility and author expertise
- Identify bias and loaded language in the presentation
Everything happens locally: no API key, no account, no server. The model downloads once (~0.8–2 GB depending on which Gemma you pick), then Perspective works offline. Your reading never leaves the browser.
Perfect for students, educators, journalists, and anyone who wants to engage more thoughtfully with online content.
- Instant Analysis - Click the extension icon while reading any article
- Fully On-Device (beta) - A small Gemma model runs locally via WebLLM + WebGPU; no API key, no account, no server
- Works Offline - After the one-time model download, no network is needed at all
- Minimalist UI - Clean, distraction-free design that puts content first
- Smart Caching - Automatically caches results for 7 days to speed up repeated analyses
- Counterarguments - Alternative perspectives and opposing viewpoints
- Logical Fallacies - Detection of flawed reasoning patterns
- Source Credibility - Assessment of author and publication trustworthiness
- Bias Detection - Identification of ideological bias and loaded language
| Model | First load | Notes |
|---|---|---|
| Gemma 3 1B (default) | ~0.8 GB | Fast, recommended |
| Gemma 2 2B | ~2 GB | Higher quality |
Smaller models are fast and fully private, but less detailed than the big cloud AI services. That's the trade for privacy and zero cost.
- Dark Mode - Auto-detect system preference or choose manually
- Customizable - Analysis feature toggles
- Private by Default - Nothing you read ever leaves your browser
- Chrome 113+ (or another Chromium browser with WebGPU enabled)
- A one-time model download (~0.8–2 GB), cached by the browser afterwards
-
Download or clone this repository
git clone https://github.com/MuataSr/perspective-browser-extension.git
-
Open Chrome Extensions
- Navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top-right)
- Navigate to
-
Load the Extension
- Click "Load unpacked"
- Select the
perspective-extensionfolder - The Perspective extension will appear in your toolbar
-
Start Using
- Navigate to any article webpage
- Click the Perspective icon
- First run: approve the one-time model download (keep the popup open while it loads; usually a few minutes). After that, it runs locally.
- Later reads are analyzed in seconds, and results are cached for 7 days
perspective-extension/
├── manifest.json # Extension configuration
├── popup.html # Main popup UI
├── popup.js # Popup logic + on-device engine (WebLLM)
├── popup.css # Popup styling
├── settings.html # Settings page UI
├── settings.js # Settings logic
├── settings.css # Settings styling
└── lib/
├── Readability.js # Mozilla's content extraction
└── webllm.bundle.js # WebLLM runtime (@mlc-ai/web-llm 0.2.85, bundled in-repo)
- Chrome Extension Manifest V3
- Vanilla JavaScript (no frameworks)
- WebLLM / WebGPU: in-browser model inference (runtime bundled; no remote code)
- Gemma: Gemma 3 1B / Gemma 2 2B (MLC builds), downloaded once and cached by the browser
- Readability.js: article text extraction
- chrome.storage API: settings and the local result cache
There is no build step: the WebLLM runtime ships in lib/. Change any file and reload the extension in chrome://extensions/.
- Load the extension (see Installation)
- Navigate to an article (news sites, blogs, etc.)
- Click the Perspective icon and approve the one-time download on first use
- Check the results in the popup; repeat visits come from the local cache
- Debug if needed:
- Popup: Right-click the extension icon → "Inspect popup"
- WebGPU status:
chrome://gpu
User clicks extension icon
↓
popup.js injects Readability.js into page
↓
popup.js extracts article text (first ~1400 chars)
↓
cache check (by URL + model + settings)
↓ (miss)
first run only: one-time download consent → model download (~0.8–2 GB)
↓
WebLLM runs Gemma locally on the GPU (WebGPU). No network
↓
result cached in chrome.storage.local (7 days)
↓
popup.js parses sections, displays in accordion
1. Popup Layer (popup.html, popup.js, popup.css)
- User interface with accordion-style results display
- Content extraction via injected Readability.js
- On-device engine: model download consent, progress display, and local inference
2. Settings Panel (settings.html, settings.js, settings.css)
- On-device model picker (Gemma 3 1B / Gemma 2 2B)
- Theme selection (auto/dark/light)
- Feature toggles (logical fallacies, source credibility, bias detection)
3. On-Device Runtime (lib/webllm.bundle.js)
- WebLLM + WebGPU inference, bundled locally
- The model itself is fetched once from Hugging Face and cached by the browser
4. Content Extraction (lib/Readability.js)
- Mozilla's battle-tested library for extracting clean article text
- Removes ads, navigation, and boilerplate content
On-device Model
- Gemma 3 1B: Fast, recommended (beta)
- Gemma 2 2B: Higher quality (beta)
Theme
- Auto: Follow system preference
- Dark: Always dark mode
- Light: Always light mode
Analysis Features
- Logical Fallacies Detection
- Source Credibility Check
- Bias Detection
None. All configuration is stored locally in Chrome's storage.
Perspective collects nothing and sends nothing: all analysis runs locally on your device. The only network activity is the one-time model download. See PRIVACY.md.
We welcome contributions! This is an Open Educational Resource (OER) project.
- Fork the repository
- Create a feature branch
- Make your changes (keep the local-only philosophy intact: no servers, no keys)
- Submit a pull request
Released under the MIT License.



