Bobby is a Chrome extension that provides instant AI-powered text analysis. Highlight any text on a webpage or PDF to get explanations, summaries, key points, and fact-checking powered by Claude 3.5 Sonnet, OpenAI GPT, and Exa search.
# Clone the repository
git clone https://github.com/yourusername/bobby-extension.git
cd bobby-extension
# Copy config template
cp config.example.js config.js
# Add your API keys to config.js:
# - ANTHROPIC_API_KEY (recommended) or OPENAI_API_KEY
# - EXA_API_KEY for fact-checking
# - Optional: PERPLEXITY_API_KEY
# Load extension in Chrome:
1. Open chrome://extensions/
2. Enable "Developer mode"
3. Click "Load unpacked"
4. Select the extension directory
5. For PDFs: Enable "Allow access to file URLs"- Explain - Get clear explanations of complex text
- Summarize - Quick summaries of long content
- Key Points - Extract main ideas
- Simplify - Make text easier to understand
- Pros & Cons - Analyze advantages and disadvantages
- Fact Check - Verify claims with web sources via Exa
- Follow-up - Ask questions about the selected text
- History - Track your analysis sessions
Edit config.js to customize:
- API Provider: Set
USE_ANTHROPIC: truefor Claude (recommended for rate limits) - UI Settings: Theme, popup width, animation speed
- Feature Flags: Enable glassmorphism UI, particle effects, context-aware buttons
- Max text length: Default 5000 characters
- Select any text on a webpage or PDF
- Bobby popup appears with action buttons
- Click an action to analyze the text
- Drag popup to reposition
- Click star to save to history
- Use fullscreen mode for longer content
Get your keys from:
- Anthropic Console - For Claude
- OpenAI Platform - For GPT
- Exa.ai - For fact-checking
Esc- Close popup- Click outside popup to dismiss
The extension uses Manifest V3 and requires no build step. Structure:
background.js- Service worker for API callscontent.js- Content script for UIcomponents/modules/- Modular functionalitystyles-v2.css- Modern glassmorphism stylespages/- Extension pages (history, options, popup)
Additional modules for clarity:
components/modules/MessageTypes.js– central action constants.components/modules/BackgroundClient.js– Promise wrapper for background messaging.components/modules/ConfigService.js– unified accessors forBOBBY_CONFIG.
Storage keys:
- History:
bobby_historywith entries{ id, timestamp, text, response, mode, metadata, followUps }.
Security:
config.jsis not web-accessible (loaded as a content script and by background viachrome.runtime.getURL). Never commit real keys.
- API keys stored locally in
config.js - No telemetry or tracking
- History stored in Chrome local storage
- All API calls made from background script
- Check API keys in
config.js - View console for errors (F12)
- Check service worker logs in chrome://extensions/
- Ensure "Allow access to file URLs" for PDFs
- Try
USE_ANTHROPIC: falseif rate limited
MIT