How siropkin/chrome-bridge works
chrome-bridge lets an AI agent operate the user’s existing, logged-in Chrome through a Node CLI, local bridge server, and Chrome extension. The main workflow is CLI command → server routing/profile selection → extension command execution against tabs → result returned to the CLI; snapshots, page actions, and screenshots are core outcomes. The README also documents setup/health management, browser diagnostics and network capture, human release controls, and optional in-page AI features. Extension internals are only partially excerpted, so edges to specific unsampled command subsystems are omitted where their dispatch is not evidenced.
Main entry points: background.js Command worker · server.mjs HTTP and WS bridge · popup.js Popup controls · cli.mjs Command CLI
Components 15
Agent interface
- Command CLI
cli.mjs
Local bridge
- HTTP and WS bridge
server.mjs - Health and profiles
server.mjs - Activity feed
server.mjs
Chrome extension
- Command worker
extension/background.js - Driven-tab narration
extension/background.js - Page snapshots
extension/background.js - Page interactions
extension/background.js - Screenshots and diffs
extension/background.js - Debugger and emulation
extension/background.js - Popup controls
extension/popup.js
Browser capabilities
- Chrome tabs
- Web pages
- Chrome Nano model
Other components
- AI agent
Connections 19
- AI agent → Command CLI: runs commands
README.md - Command CLI → HTTP and WS bridge: posts commands
README.md - HTTP and WS bridge → Command worker: dispatches commands
server.mjs - Command worker → HTTP and WS bridge: returns replies
server.mjs - Command worker → Chrome tabs: controls tabs
- Command worker → Driven-tab narration: marks activity
extension/background.js - Command worker → Page snapshots: creates snapshots
extension/background.js - Command worker → Page interactions: executes actions
extension/background.js - Command worker → Screenshots and diffs: captures images
extension/background.js - Command worker → Debugger and emulation: uses debugger
extension/background.js - Page interactions → Web pages: acts on pages
- Screenshots and diffs → Web pages: captures viewport
extension/background.js - Command CLI → Health and profiles: checks status
cli.mjs - HTTP and WS bridge → Health and profiles: serves health
server.mjs - HTTP and WS bridge → Activity feed: serves feed
server.mjs - Popup controls → Health and profiles: fetches status
extension/popup.js - Popup controls → Command worker: requests release
extension/popup.js - Popup controls → Chrome tabs: queries active tab
extension/popup.js - AI agent → Chrome Nano model: asks page questions