PageHand

An AI side panel for injecting dynamic page scripts, reshaping any page on demand, and replaying those changes automatically.

Download Latest Release Free & open source · 4-step install
Chrome MV3 OpenAI Compatible React 18 TypeScript WXT Framework MIT License
PageHand side panel showing chat interface and generated script

Most browser AI tools stop at summarization.

PageHand goes one step further: read the page, generate a runnable script, execute it from chat, and persist it for automatic replay.

1

Read the current page context

PageHand extracts the page structure, content, and interactive elements so the model knows exactly what's on screen.

2

Generate a runnable script

Describe the change in natural language. The model generates a self-contained JavaScript snippet tailored to that page.

3

Execute from chat

Review the generated code, choose a persistence scope (exact URL, path, or domain), and inject it into the page instantly.

4

Persist & replay automatically

The rule is saved locally and registered with chrome.userScripts. It runs automatically on revisit — even across SPA route changes.

What makes PageHand different

From natural language to persistent page automation in one flow.

Dynamic page scripts from natural language

Generate and execute page-modifying scripts without hand-writing code.

Inject UI, remove sections, rewrite content

Reshape any page on demand — declutter, translate, highlight, or insert custom elements.

Persist by path, exact, or domain

Choose the scope that matches your workflow — from a single URL to an entire site.

Multiple scripts per page

Layer multiple rules on the same page. Each runs independently in order.

SPA-aware replay

Listens for route transitions in single-page applications and re-runs matching rules automatically.

Chat with the current page

Ask questions about what's on screen instead of starting from a blank LLM session.

Toggle search per message

Get extra context from DuckDuckGo when you need it, without cluttering every request.

Active rule inspector

See which scripts apply to the current page and enable or disable them instantly.

Prompt library shortcuts

Save your most-used prompts for quick reuse — clean layout, translate, highlight, and more.

Light, dark, and auto themes

Matches your system preference or lets you choose manually.

From page to script in one cycle

PageHand orchestrates a tight loop between the browser, the model, and your page.

Current page
Page context extractor
PageHand side panel
AI model API
Answer or script
Execute in tab
Persist rule
Auto-run on revisit

Five features that work together

Each capability builds on the one before it — from simple Q&A to persistent page automation.

1. Current-page assistant

PageHand answers with awareness of the active tab. Ask about what's on screen, extract key information, or analyze the page structure.

  • Summarize the current page
  • Extract facts and data
  • Identify next actions

2. Script generation mode

Enable script mode to modify the page instead of only answering. The model returns a runnable script with a summary and execution controls.

  • Remove ads and clutter
  • Insert summary cards
  • Highlight key CTAs
  • Translate content in place

3. Persistent page scripting

After execution, scripts are stored locally and registered with chrome.userScripts. They replay automatically on revisit.

  • Automatic replay on revisit
  • Reusable site rules
  • Layered rules on the same page
  • No re-prompting needed

4. SPA-aware replay

For single-page applications, PageHand listens for route transitions and re-runs matching rules when the URL changes.

  • Monitors pushState/replaceState
  • Handles popstate and hashchange
  • Zero-config for most SPAs

5. Active rule visibility

The side panel shows whether the current page has matching scripts and lets you manage them on the spot.

  • Inspect effective status
  • Run a rule immediately
  • Enable or disable with one click

Designed for real workflows

Every decision in PageHand is guided by these principles.

Chat-first

The side panel should feel like a normal assistant — not a developer console.

Minimal friction

Search and script mode are simple toggles next to send. No modal dialogs, no complex setup.

Personal automation

Generated scripts are for self-use and repeated workflows. You own the rules you create.

Local ownership

Settings and rules live in browser storage. No account, no cloud sync, no telemetry.

Fast iteration

Generate, execute, refine, and keep the result. The feedback loop is seconds, not minutes.

Get started in 4 steps

PageHand is a Chrome extension sideloaded from the latest release. No store listing required.

1

Download the latest release

Download the pagehand-*-chrome.zip asset from the latest release on GitHub.

2

Extract the zip

Unzip to any folder on your machine that you can keep in place.

3

Load as unpacked extension

Open chrome://extensions, enable Developer Mode, and click Load unpacked. Select the extracted folder.

4

Enable User Scripts

In the extension details page, toggle Allow User Scripts on. This is required for persistent script replay.

Chrome extension details with Allow User Scripts toggle highlighted

From install to first script

Once loaded, getting started takes seconds.

1

Open a normal page

Any http, https, or file page works.

2

Open PageHand from the Chrome side panel

Click the PageHand toolbar icon or navigate to the side panel via Chrome's side panel menu.

3

Configure your model provider

Open Settings and enter your API key, base URL, and model name. Any OpenAI-compatible endpoint works.

4

Try a quick action

Click a pre-built action like "Summarize this page" or type your own question. Turn on script mode to generate a page modification.

5

Execute, revisit, and refine

Choose a scope (path, exact, or domain), click execute, and revisit the page to confirm the script auto-runs.

Any OpenAI-compatible endpoint

You are not locked to a specific provider. Point PageHand at any compatible API that supports chat completions.

Default configuration

DeepSeek is the default example, but any provider works.

Base URL: https://api.deepseek.com/v1
Model:    deepseek-chat
API Key:  sk-...

Requirements

  • POST /chat/completions endpoint
  • Bearer-token authentication
  • Regular text + JSON response support
  • Works with self-hosted gateways

Full control from the settings page

Every aspect of PageHand is configurable through the options page.

Connection

API key, base URL, model name, temperature, and max tokens. Test your connection before saving.

Behavior

Default script scope (exact, path, or domain), search toggle, and theme mode (light, dark, auto).

Customization

Prompt library for reusable templates and site-specific instructions that apply automatically per hostname.

Build from source

PageHand is open source. Clone the repo and start hacking.

Setup

git clone https://github.com/lwxyfer/pagehand.git
cd pagehand
npm install
npm run dev

Build & Package

# Type-check
npm run compile

# Production build
npm run build

# Distributable zip
npm run zip

Transparent by design

PageHand uses only the Chrome APIs it needs, and your data stays local.

sidePanel

Chat UI in the Chrome side panel.

storage

Settings and persistent rules stored locally.

tabs

Current-tab awareness for page context.

scripting

Inject the page bridge for context extraction.

userScripts

Persist and replay generated page scripts.

Privacy

Settings and script rules are stored exclusively in browser storage. Current page content is sent to the configured AI endpoint only when you explicitly ask for analysis or script generation. PageHand does not require a hosted backend to function.

What you can do with PageHand

Real workflows that benefit from persistent page scripting.

Clean cluttered articles and focus on the main content.

Add custom reading aids to documentation pages.

Highlight internal workflow steps on dashboards.

Insert summaries or action cards into repeated work pages.

Build lightweight augmentations for SaaS tools without userscripts.

Translate page content while preserving layout.

What to know before using

PageHand is a powerful tool. Use it responsibly.

Limitations

Chrome internal pages (chrome://) are not supported. Script side effects cannot always be reversed without reloading. Script quality depends on the target DOM and generated code. Currently Chromium-only.

Safety Notes

Generated scripts are code and should be treated seriously. Avoid script generation on sensitive pages — banking, payment, identity, or production admin systems. Intended for self-use in controlled environments.