A powerful browser extension that brings OpenRouter's AI capabilities directly into your browser. Use AI to assist with writing, analysis, coding, social media, and more.
- Email Composition: Generate professional emails
- Blog Posts: Create engaging blog content
- Articles: Write comprehensive articles
- Technical Documentation: Create clear technical docs
- Academic Papers: Generate scholarly content
- Summarization: Quick or detailed summaries of any content
- Sentiment Analysis: Analyze emotional tone and sentiment
- Key Point Extraction: Pull out important information
- Data Analysis: Analyze numerical and textual data
- Review & Critique: Get balanced, constructive feedback
- Code Explanation: Get clear explanations of code
- Code Generation: Create code from descriptions
- Code Improvement: Optimize and enhance code
- Documentation: Generate code documentation
- Test Generation: Create unit tests
- To English: Translate any text to English
- From English: Translate English to other languages
- Translation Improvement: Enhance existing translations
- Tweet/Post Replies: Generate contextual social media replies
- Thread Creation: Create engaging tweet threads
- Engagement Optimization: Improve post engagement
- Hashtag Generation: Generate relevant hashtags
- Research: Deep dive into topics
- Meeting Notes: Generate meeting summaries
- Proofreading: Check and improve text
- Citation: Add proper citations to content
-
Clone this repository:
git clone https://github.com/geeknik/ai-swiss-army-knife/ cd ai-swiss-army-knife
-
Load in Brave:
- Open
brave://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the extension directory
- Open
- Get an API key from OpenRouter
- Click the extension icon
- Enter your OpenRouter API key
- Optionally select default models for different tasks
- Select text on any webpage
- Right-click to access the AI Swiss Army Knife menu
- Choose your desired action from the categories:
- Write
- Analyze
- Code
- Translate
- Assist
- Social
The result will appear in a floating window where you can:
- View the generated content
- Copy to clipboard
- Save to file
- Regenerate if needed
- Built with vanilla JavaScript using ES modules
- Uses Chrome Extension Manifest V3
- Integrates with OpenRouter's API for access to multiple AI models
- Real-time streaming support for longer content generation
manifest.json
: Extension configurationsrc/background.js
: Service worker for extension functionalitysrc/openrouter.js
: OpenRouter API integrationsrc/content.js
: Content script for webpage integrationsrc/content.css
: Styling for the UI elementspopup.html/js
: Settings interface
- Dynamic model selection based on task
- Streaming responses for longer content
- Automatic error recovery
- Context-aware prompts
- Task-specific configurations
- Response format validation
The extension automatically selects the best AI model for each task based on:
- Task requirements (context length, tools needed)
- Model capabilities
- Cost efficiency
- Response time
- API keys are stored securely in Chrome's sync storage
- No data is stored except your OpenRouter API key
- All processing happens through OpenRouter's API
- Content remains private between you and the AI model
To modify or enhance the extension:
- Clone the repository
- Make your changes
- Test locally by loading the unpacked extension
- Submit pull requests for improvements
To add new capabilities:
- Add menu items to
MENU_STRUCTURE
in background.js - Add task configurations to
TASK_CONFIGS
- Update UI handling in content.js if needed
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - see LICENSE file for details.