OllamaBro is a Chrome extension that provides a convenient interface to interact with your local Ollama models. It allows you to quickly switch between models, manage multiple conversations, and chat directly from your browser.
- Model Management: View and switch between all your available Ollama models directly from the extension popup.
- Multi-Conversation Chat:
- Chat with your models in a dedicated browser tab.
- Keep multiple conversations organized per model.
- A collapsible sidebar lists all your conversations for easy navigation.
- Persistent History: Your chat history is saved locally, so you can pick up where you left off.
- Message Actions: Easily copy messages or download conversations as
.txtor.mdfiles. - Modern UI: A clean, dark-themed, and responsive user interface.
- Real-time Responses: See the model's response stream in as it's generated.
- Usability:
- Auto-focus on the input field for a seamless chat experience.
Before you begin, ensure you have the following installed:
The extension consists of two main parts: a local proxy server to handle CORS requests to Ollama, and the Chrome extension itself.
The proxy server is necessary to bypass Cross-Origin Resource Sharing (CORS) restrictions when the extension communicates with the local Ollama API.
- Navigate to the
proxy_serverdirectory:cd path/to/OllamaBro/proxy_server - Install the dependencies:
npm install
- Start the server:
The server will start on
npm start
http://localhost:3000. You need to keep this terminal window open while using the extension.
To avoid having to manually start the server every time, you can use PM2, a process manager for Node.js applications.
- Install PM2 globally:
npm install pm2 -g
- Navigate to the proxy server directory:
cd path/to/OllamaBro/proxy_server - Start the server with PM2:
pm2 start server.js --name ollama-proxy
- Enable PM2 to start on system boot:
This command will generate another command that you need to run. It may require administrator privileges.
pm2 startup
- Save the current process list:
Now, the proxy server will automatically start whenever you restart your system.
pm2 save
You can manage the process with these commands:
pm2 list: List all running processes.pm2 logs ollama-proxy: View logs for the proxy.pm2 stop ollama-proxy: Stop the proxy.pm2 restart ollama-proxy: Restart the proxy.pm2 delete ollama-proxy: Remove the proxy from PM2's list.
- Open Google Chrome and navigate to
chrome://extensions. - Enable Developer mode using the toggle in the top-right corner.
- Click the Load unpacked button.
- Select the
chrome_extensionfolder from the project directory.
The OllamaBro icon should now appear in your Chrome toolbar. Click it to see your available models and start chatting!
