Skip to content

🌌 Browser sidebar AI assistant for OpenClaw β€” chat with AI while browsing any webpage, with automatic page context, text selection, and image support

License

Notifications You must be signed in to change notification settings

r266-tech/openclaw-sidebar

Repository files navigation

🌌 OpenClaw Sidebar

License: MIT TypeScript Preact Vite

AI assistant in your browser sidebar β€” powered by OpenClaw Gateway

Chat with your AI assistant while browsing any webpage. The sidebar automatically captures page context, selected text, and images β€” making your AI truly context-aware.

✨ Features

Feature Description
πŸ’¬ Sidebar Chat Chat with AI without leaving your current page
πŸ” Context-Aware Automatically captures current page URL, title, and content
βœ‚οΈ Text Selection Select text on any page β€” AI sees what you selected
πŸ“„ Page Content Extracts page body text for AI reference
πŸ–ΌοΈ Image Support Paste or drag-and-drop images into chat
⚑ Streaming Real-time streaming output with smooth typing effect
πŸ“ Markdown Full Markdown rendering with code highlighting, tables, lists
πŸ”„ SPA Support Auto-updates context when navigating single-page apps

πŸ“¦ Installation

From Source

git clone https://github.com/r266-tech/openclaw-sidebar.git
cd openclaw-sidebar
npm install
npm run build

Load in Browser

Browser Steps
Edge edge://extensions/ β†’ Enable Developer mode β†’ Load unpacked β†’ Select dist/
Chrome chrome://extensions/ β†’ Enable Developer mode β†’ Load unpacked β†’ Select dist/

Note: Manifest V3 extension, compatible with Chromium-based browsers.

βš™οΈ Configuration

1. Gateway Connection

Right-click the extension icon β†’ Options, then configure:

Setting Example
Gateway URL http://127.0.0.1:18789
Gateway Token Your OpenClaw gateway token

2. Finding Your Token

# Method 1: Read config directly
cat ~/.openclaw/openclaw.json | grep -A2 '"auth"'

# Method 2: Use OpenClaw CLI
openclaw config get gateway.auth.token

3. Image Support (Optional, macOS)

Enable AI image recognition with a one-time setup:

./native-host/install-file-bridge.sh

Images are saved to ~/clawd/screenshots/sidebar/. To uninstall:

launchctl unload ~/Library/LaunchAgents/com.openclaw.file-bridge.plist

🎯 Usage

  1. Click the extension icon or press Cmd+Shift+B (Mac) / Ctrl+Shift+B (Windows)
  2. Type your message in the sidebar
  3. Pro tip: Select text on the page before sending β€” AI will see your selection as context

πŸ› οΈ Development

# Development mode with hot reload
npm run dev

# Production build
npm run build

Tech Stack

Project Structure

src/
β”œβ”€β”€ background/    # Service worker (extension lifecycle)
β”œβ”€β”€ content/       # Content script (page interaction)
β”œβ”€β”€ sidebar/       # Main sidebar UI (Preact components)
β”œβ”€β”€ options/       # Extension options page
└── styles/        # Tailwind CSS configuration

🀝 Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

πŸ“„ License

MIT Β© 2026 r266-tech


Built with 🌌 for the OpenClaw ecosystem

About

🌌 Browser sidebar AI assistant for OpenClaw β€” chat with AI while browsing any webpage, with automatic page context, text selection, and image support

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors