ChatBrowse is a powerful Chrome extension that transforms web browsing through AI-powered natural language commands. Navigate, search, and interact with websites using intelligent automation and conversational interfaces.
- Natural Language Processing: Execute commands like "find videos about Python programming"
- Smart Platform Detection: Automatically detects YouTube, Google, Amazon, and other platforms
- Two-Step Execution: AI plans actions, then executes on your command
- Cross-Platform Search: Works seamlessly across different websites
- Persistent Sessions: Chat history saved per website
- Context-Aware Responses: AI understands page content and user intent
- Real-time Interaction: Instant feedback and action execution
- Error Recovery: Intelligent fallback mechanisms
- Service-Based Design: Modular, maintainable codebase
- TypeScript: Full type safety and IntelliSense support
- Production-Ready: Optimized builds with tree shaking
- Developer-Friendly: Source maps and debugging tools
- Chrome Browser (latest version recommended)
- Node.js v14+ and npm v6+
- OpenAI API Key (Get one here)
-
Clone & Setup
git clone https://github.com/JKevinXu/ChatBrowse.git cd ChatBrowse npm install -
Build the Extension
npm run build
-
Load in Chrome
- Open
chrome://extensions/ - Enable "Developer mode" (top-right toggle)
- Click "Load unpacked" β Select the
dist/folder - Pin the ChatBrowse icon to your toolbar
- Open
-
Configure API Key
- Click the ChatBrowse icon
- Click the settings gear βοΈ
- Enter your OpenAI API key
- Save settings
"find videos about machine learning" β Searches YouTube
"search for wireless headphones" β Searches Amazon
"look for news about climate change" β Searches Google
"go to youtube.com" β Navigates to URL
"navigate to the homepage" β Smart navigation
"extract info from this page" β Summarizes content
"set context on" β Enables page context
- Request: Type your command (e.g., "find cooking videos")
- Plan: AI shows what it will do (90% confidence)
- Execute: Say "do it" to run the actions
- Result: Actions execute automatically with feedback
π src/
βββ π§ services/ # Core business logic
β βββ action-service.ts # Action planning & execution
β βββ openai-service.ts # AI integration
β βββ search-service.ts # Multi-platform search
β βββ message-router.ts # Message handling
β βββ navigation-service.ts # Navigation logic
β βββ context-service.ts # Page context management
β βββ config-service.ts # Settings & configuration
βββ π± popup/ # Extension popup UI
β βββ popup-ui.ts # DOM manipulation
β βββ session-manager.ts # Session persistence
β βββ message-handler.ts # Background communication
βββ π content/ # Content script services
β βββ action-executor.ts # Page automation
β βββ page-analyzer.ts # Page structure analysis
β βββ chat-ui.ts # Chat interface
βββ π οΈ utils/ # Utility modules
β βββ content-extractor.ts # Page content extraction
β βββ command-processor.ts # Command parsing
β βββ storage-utils.ts # Chrome storage operations
βββ background.ts # Service worker
βββ content.ts # Content script entry
βββ popup.ts # Popup entry
βββ types.ts # TypeScript definitions
- Production Build:
npm run build(143 KiB, optimized) - Development Build:
npm run build:dev(199 KiB, debug enabled) - Watch Mode:
npm run watch(auto-rebuild on changes)
npm run build # Production build (optimized, no console.log)
npm run build:dev # Development build (source maps, debug)
npm run watch # Watch mode for development- Production: Minified, console.log removed, debug excluded
- Development: Source maps, debug tools, full logging
- β Single Responsibility Principle: Each service has one clear purpose
- β Dependency Injection: Services can be easily mocked and tested
- β Type Safety: Full TypeScript coverage with strict mode
- β Error Handling: Consistent error handling across all services
- β Modularity: Easy to extend and maintain
- API Key: Required for AI functionality
- Model: GPT-3.5-turbo (configurable)
- Context: Automatic page content inclusion
- Notifications: Enable/disable system notifications
- Theme: Light/dark mode support
- Language: Multi-language support (planned)
We welcome contributions! The codebase is designed for easy extension and modification.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
npm install - Start watch mode:
npm run watch - Make your changes
- Test with
npm run build:dev - Submit a Pull Request
- TypeScript: Strict mode enabled
- Services: Follow the existing service pattern
- Error Handling: Use consistent error handling patterns
- Testing: Add tests for new functionality (planned)
| Script | Production | Development |
|---|---|---|
| Background | 118 KiB | 158 KiB |
| Content | 18.4 KiB | 22 KiB |
| Popup | 5.44 KiB | 10.3 KiB |
| Total | 143 KiB | 199 KiB |
- No response from AI: Check OpenAI API key in settings
- Actions not executing: Refresh page and try again
- Search not working: Ensure you're on a supported platform
Use development build (npm run build:dev) for detailed console logging and debugging tools.
This project is licensed under the ISC License - see the LICENSE file for details.
- Repository: GitHub
- Issues: Bug Reports
- OpenAI API: Get API Key
Made with β€οΈ by JKevinXu
Transform your browsing experience with intelligent automation