mirror of
https://github.com/hanzoai/browser-extension.git
synced 2026-10-30 20:02:07 +00:00
main
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
DEPRECATED — Moved to hanzoai/extension
This repo is archived. All browser extension development now lives in
hanzoai/extensionunderpackages/browser/.All auth fixes from this repo have been back-merged into the monorepo. Please file issues and PRs there.
Hanzo AI Browser Extension
AI-powered browser extension for Chrome, Firefox, Edge, and Safari.
Features
- AI Chat Sidebar: Chat with Claude, GPT-4, Gemini, and more
- Page Analysis: Summarize, explain, and query any webpage
- Selection Actions: Right-click menu for AI operations on selected text
- MCP Integration: Access 260+ MCP tools from your browser
- Cloud Sync: Sync conversations and settings via cloud.hanzo.ai
Installation
Chrome / Edge / Brave
- Download the latest release from Releases
- Open
chrome://extensions(oredge://extensions) - Enable "Developer mode"
- Click "Load unpacked" and select the
distfolder
Firefox
- Download the latest release
- Open
about:debugging - Click "This Firefox" → "Load Temporary Add-on"
- Select
manifest.json
Safari
- Enable developer mode in Safari preferences
- Download the macOS app version from Releases
- Open the app and enable the extension in Safari preferences
Development
# Install dependencies
npm install
# Build extension
npm run build
# Watch mode for development
npm run watch
# Run tests
npm test
Building for Production
# Build for all browsers
npm run build
# The dist/ folder contains the extension ready for loading
Project Structure
browser-extension/
├── src/
│ ├── background/ # Service worker / background script
│ ├── content/ # Content scripts injected into pages
│ ├── popup/ # Extension popup UI
│ ├── sidebar/ # AI chat sidebar
│ └── shared/ # Shared utilities
├── dist/ # Built extension
├── manifest.json # Extension manifest (MV3)
├── package.json
└── tsconfig.json
Configuration
API Keys
The extension uses your Hanzo AI account for API access. Login at:
- cloud.hanzo.ai - Cloud dashboard
- iam.hanzo.ai - API key management
Or set environment variables for direct provider access:
ANTHROPIC_API_KEY- Claude modelsOPENAI_API_KEY- GPT modelsGOOGLE_API_KEY- Gemini models
Permissions
The extension requests minimal permissions:
activeTab- Access to current tab when activatedstorage- Store settings and conversations locallycontextMenus- Right-click menu integration
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Content Script │ ◄──► │ Background │ ◄──► │ Hanzo API │
│ (Page Context) │ │ (Service Worker) │ │ (api.hanzo.ai) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌──────────────────┐
│ Popup / Sidebar │ │ MCP Bridge │
│ (React UI) │ │ (WebSocket) │
└─────────────────┘ └──────────────────┘
Related Projects
- ide-extension - VS Code and JetBrains plugins
- hanzo-mcp - Model Context Protocol tools
- hanzo.vim - Vim/Neovim plugin
- hanzo.el - Emacs package
License
MIT - See LICENSE
Languages
TypeScript
72.4%
JavaScript
13.1%
CSS
8.5%
HTML
5.4%
Shell
0.6%