A Chrome extension that detects bias and misinformation in online articles using Google's Gemini AI.
- Bias Detection — Identifies left, right, or neutral bias with explanations
- Emotional Language — Highlights emotionally charged language in articles
- Missing Context — Surfaces facts or context the article may have omitted
- Opposing Viewpoints — Presents alternative perspectives
- Trust Score — Rates article credibility on a 0–100 scale
- Clone this repository:
git clone https://github.com/Sujthr/TruthLens.git
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (top-right toggle)
- Click Load unpacked and select the
TruthLensfolder
- Get a free Gemini API key from Google AI Studio
- Click the TruthLens extension icon in your browser toolbar
- Enter your API key in the input field and click Save
Your API key is stored locally in your browser's extension storage. It is never hardcoded or shared.
- Navigate to any news article or blog post
- Click the TruthLens extension icon
- Click Analyze Article
- View the AI-generated bias analysis in the popup
- Chrome Extension (Manifest V3)
- Google Gemini 2.5 Flash-Lite for AI analysis
- Chrome Storage API for secure local key storage
TruthLens/
├── manifest.json # Extension configuration
├── background.js # Service worker — handles Gemini API calls
├── content.js # Content script — extracts article text
├── popup.html # Extension popup UI
├── popup.js # Popup logic — key management & analysis trigger
├── styles.css # Popup styling
└── README.md
MIT