Turn any web terminal into an AI-powered command center
A Chrome extension that integrates multiple AI providers (Claude, OpenAI, Gemini, Ollama, and more) directly into any web-based terminal, command interface, or code editor. Eliminate copy-paste between your terminal and AI tools!
π This project is now open source! Feel free to use, modify, and contribute.
- Universal Compatibility: Works with any web-based terminal, code editor, or command interface
- RPort, Cloud Shell, GitPod, VS Code Web, CodeSandbox, Replit, and more!
- Multi-Provider Support: Choose from 9+ AI providers including Claude, OpenAI, Gemini, Ollama, and more
- Selection-Based Hover: Select any text and get a Medium-style hover button - no buttons cluttering your page!
- Improved Scripts: Get AI-powered script improvements instantly
- Auto-Insert: Insert improved scripts directly into your terminal
- Conversational Context: AI learns from previous attempts and errors
- Clean UX: Only shows AI button when you need it - by selecting text
- Custom Selectors: Configure selectors for any specific web application
- Privacy First: API keys stored locally, fully open source, optional local AI with Ollama
- Clone or download this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the extension directory
β You should see "AI Code Buddy" appear in your extensions list!
Pick one based on your needs:
| If you want... | Choose... | Cost |
|---|---|---|
| Best code quality | Claude | $20/month API |
| General purpose | OpenAI | $20/month API |
| FREE option | Gemini | FREE tier |
| 100% privacy | Ollama | FREE (runs locally) |
Don't have any? Start with Gemini (it's free!) or Ollama (completely private).
For Gemini (FREE - Recommended for testing):
- Go to Google AI Studio
- Click "Create API Key"
- Copy the key (starts with
AIza...)
For Claude:
- Go to Anthropic Console
- Click "API Keys" β "Create Key"
- Copy the key (starts with
sk-ant-...)
For OpenAI:
- Go to OpenAI Platform
- Click "Create new secret key"
- Copy the key (starts with
sk-...)
For Ollama (no key needed!):
- Install from ollama.ai
- Run:
ollama pull codellama - Your endpoint:
http://localhost:11434
π More providers: See docs/API-KEYS-GUIDE.md
- Click the extension icon in Chrome toolbar
- Select your AI provider from the grid
- Enter your API key (or endpoint for Ollama)
- Click "Save Configuration"
- Click "Test Connection" to verify
β Status should show "Connected" in green!
- Open any web terminal (RPort, Cloud Shell, etc.)
- Run any command
- Select the text you want to analyze (terminal output, logs, errors)
- A hover button appears above your selection
- Click the hover button - AI analyzes and provides an improved script
- Click "Use Script" to insert it into the terminal
- Run the improved script!
π You're done! If the script fails, select the error and repeat - the AI learns from previous attempts!
- Navigate to any web terminal in Chrome (RPort, Cloud Shell, GitPod, etc.)
- Run a command in your terminal
- Select the output text you want to analyze (terminal output, logs, errors, code snippets)
- A hover button appears above your selection (like Medium's annotation feature)
- Click the hover button - AI analyzes the selection and provides insights/improvements
- Review the AI's response in the modal, edit if needed
- Click "Use Script" to insert it into the command input
- Run the improved script
- If it fails, select the error output and repeat - the AI learns from previous attempts!
- RPort - Remote system management
- Google Cloud Shell - Cloud-based terminals
- AWS CloudShell - AWS command line interface
- GitPod - Cloud development environments
- VS Code Web - Browser-based VS Code
- CodeSandbox - Online code editor
- Replit - Collaborative coding platform
- Any web app with terminal/command input areas!
The extension maintains context of your last 5 attempts:
- AI remembers what scripts you tried
- AI sees what errors occurred
- AI won't repeat the same failed approach
- Session-based (resets on page refresh)
Access via the extension popup:
Setup Tab:
- Select AI provider
- Configure API key/endpoint
- Test connection
Settings Tab:
- Auto-improve on failure
- Improve selected text
- Custom CSS selectors
- Clear all settings
Advanced Tab:
- Custom system prompts
- Max tokens (100-4000)
- Temperature (0-1)
- Request timeout
- Export/import configuration
π Your API keys are safe - Read full security documentation
Quick facts:
- β Stored locally in Chrome's encrypted storage
- β Never sent to us (no backend server exists)
- β Only sent to your chosen AI provider
- β Fully open source (audit the code yourself)
- β No tracking or analytics
- β Works 100% offline with Ollama
For maximum privacy: Use Ollama (completely local, no API key, no network)
π Full Documentation Site - Complete guides, tutorials, and examples
Key Documentation:
- Site-Specific Prompts β¨ NEW! - Configure different AI behavior per website
- Quick Start Guide - Get up and running in 5 minutes
- API Keys Guide - How to get API keys for all providers
- Security Policy - Complete security & privacy transparency
- Troubleshooting - Common issues and solutions
See docs/TROUBLESHOOTING.md for detailed solutions.
Buttons Not Appearing:
- Refresh the page
- Check browser console (F12)
- Configure custom selectors if needed
CORS Errors:
- Claude: Headers are automatically included
- Custom providers: Check CORS configuration
Connection Test Fails:
- Verify API key is correct
- Check provider status page
- Try Ollama for local testing
Buttons Repeating Infinitely:
- Fixed in v2.0.0 with triple protection
- Reload extension if issue persists
ai-code-buddy/
βββ manifest.json # Extension configuration
βββ content.js # UI injection and interaction
βββ background.js # AI provider integration
βββ providers.js # Multi-provider abstraction layer
βββ popup-multi.html # Settings interface
βββ popup-multi.js # Popup functionality
βββ styles.css # Injected styles
βββ icons/ # Extension icons & generator
βββ docs/ # Comprehensive documentation
β βββ API-KEYS-GUIDE.md # API keys & provider comparisons
β βββ SECURITY.md # Security & privacy details
β βββ TROUBLESHOOTING.md # Common issues & solutions
βββ README.md # This file
- Chrome/Chromium 88+
- Edge 88+
- Brave (latest)
- Other Chromium-based browsers with Manifest V3 support
- Make changes to the code
- Go to
chrome://extensions/ - Click the refresh icon on the extension card
- Test changes in RPort
- Check browser console for debug logs
Important: Use the build script to create a production package that excludes development files.
Windows:
build.batLinux/Mac:
chmod +x build.sh
./build.shThe build script will:
- β Copy only essential extension files
- β Include icons (PNG and SVG only)
- β Include essential docs (SECURITY.md, TROUBLESHOOTING.md)
- β Exclude
icons/node_modules/(reduces size by ~20MB) - β Exclude
icons/generate-icons.js,icons/package*.json - β Exclude
.git,.claude,.gitignore - β Exclude
test/directory - β Exclude legacy files (
popup.html,popup.js) - π¦ Create ZIP file:
ai-code-buddy-vX.X.X.zip
Manual Build:
- Update version in
manifest.json - Test with multiple providers
- Run the build script
- Test the generated ZIP before uploading
- Upload to Chrome Web Store
Build Output:
- Typical size: ~50KB (vs ~20MB with dev files)
- Ready for Chrome Web Store submission
v2.0.0 (Current)
- β Multi-provider support (9+ providers)
- β Conversational context (learns from errors)
- β Ollama local AI support
- β Fixed infinite button bug
- β Fixed script insertion for contenteditable DIVs
- β Comprehensive security documentation
- β Enhanced troubleshooting guide
v1.0.0
- Initial release (Claude-only)
- Icons are placeholders (generate proper ones using included HTML tool)
- May need custom selectors for heavily customized RPort instances
- Conversation context limited to 5 previous attempts
- Some providers may have CORS restrictions
- Streaming responses for faster feedback
- Provider fallback logic (auto-switch on failure)
- Script library (save frequently used scripts)
- Batch operations (improve multiple scripts at once)
- Team sharing (share improved scripts)
- Direct RPort API integration
- Browser action for quick provider switching
- Issues & Bugs: GitHub Issues
- Security Issues: See docs/SECURITY.md for private disclosure
- Extension Version: 2.0.0
- Tested with: RPort, Google Cloud Shell, GitPod, VS Code Web, CodeSandbox, Replit, and more!
This project is open source and available under two licenses:
- Source Code: MIT License - Free to use, modify, and distribute
- Documentation: Creative Commons Attribution 4.0 International (CC BY 4.0)
You are free to:
- Use this extension for personal or commercial purposes
- Modify and customize it for your needs
- Distribute your modified versions
- Contribute improvements back to the project
See the LICENSE file for full details.
We welcome contributions! This is an open source project and we'd love your help.
Ways to contribute:
- Report bugs and request features via GitHub Issues
- Submit pull requests for bug fixes or new features
- Improve documentation
- Add support for new AI providers
- Add support for more web-based terminals and IDEs
- Share your use cases and success stories
Getting started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed contribution guidelines.
Built by Apra Labs to streamline terminal and command-line workflows with AI assistance. Works universally with any web-based terminal or code interface.
Apra Labs is a technology venture with proven experience in:
- Cloud computing and serverless technologies
- AI and Machine Learning solutions
- Video processing and embedded technologies
- Mobile and web application development
Learn more at apralabs.com
π Security Note: This extension has zero backend infrastructure. Your API keys are stored locally in Chrome's encrypted storage and only sent to your chosen AI provider. Full details