Skip to main content

pagescope

Chrome DevTools in your terminal. A real-time TUI that streams network requests, console messages, performance metrics, security analysis, and more -- powered by Playwright and CDP.

Python 3.11+ License

What It Does

https://github.com/user-attachments/assets/529c4cb7-a178-4156-8b4e-d399594ba364

PageScope connects to Chrome/Edge and gives you a full DevTools experience rendered in the terminal:

  • Network tab with live request streaming, waterfall timing visualization, headers/timing/preview detail panels
  • Console tab with message filtering, stack traces, and a JavaScript REPL
  • Performance tab with Core Web Vitals gauges, page flow timeline, and CPU profiler
  • Security tab with TLS analysis, mixed content detection, CSP violations, cookie audit
  • Elements tab with collapsible DOM source tree and browser element highlighting
  • Cookies tab with full cookie enumeration and security flag analysis
  • WebSocket tab with connection tracking, frame inspection, and payload viewer

6 color themes. HAR import/export. User-Agent spoofing. No-Cache mode. Works as CLI, TUI, MCP server, or Python library.

Quick Start

Install

# Create a virtual environment (recommended)
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
# source .venv/bin/activate

pip install pagescope
playwright install chromium

Or from source:

git clone https://github.com/hed0rah/pagescope.git
cd pagescope
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -e .
playwright install chromium

Easiest Way to Run

pagescope launch-chrome

This finds Chrome/Edge on your system, launches it with remote debugging enabled, and opens the TUI attached to it. Browse normally in Chrome -- everything streams to the TUI in real-time.

Other Ways to Run

# Analyze a URL directly (launches headless Chromium)
pagescope tui https://example.com

# Attach to a browser you already started with --remote-debugging-port=9222
pagescope attach

# Load a HAR file for offline analysis
pagescope tui --har capture.har

Keyboard Shortcuts

Key Action
q Quit
g Navigate to URL
f Filter / Search
c Clear current tab
p Pause / Resume
t Cycle theme
u Cycle User-Agent
n Toggle No-Cache
k Toggle Keep Log
h Export HAR
l Load HAR
? Show legend

CLI

Run diagnostics from the command line with structured output.

# Full diagnostic
pagescope diagnose https://example.com

# Target specific symptoms
pagescope diagnose https://example.com --symptom slow_page
pagescope diagnose https://example.com --symptom api_failures --symptom console_errors

# Individual modules
pagescope network https://example.com
pagescope performance https://example.com --cpu-profile
pagescope console https://example.com
pagescope security https://example.com
pagescope accessibility https://example.com
pagescope dom https://example.com
pagescope interactive https://example.com

# Site crawl
pagescope crawl https://example.com --depth 2 --max-pages 20

# Output formats: rich (default), json, html
pagescope diagnose https://example.com --format json
pagescope diagnose https://example.com --format html --output report.html

MCP Server

For use with Claude Code, Claude Desktop, or any MCP-compatible AI agent:

pagescope serve

Add to your MCP client config:

{
  "mcpServers": {
    "pagescope": {
      "command": "pagescope",
      "args": ["serve"]
    }
  }
}

Exposes 14 tools: diagnose_url, check_network, check_performance, check_console_errors, check_security, check_accessibility, check_dom, crawl_site, capture_screenshot, interact_with_page, test_user_flow, analyze_interactive_elements, test_form_submission, run_javascript.

Python API

from pagescope.session import DiagnosticSession
from pagescope.orchestrator import Orchestrator, Symptom

async with DiagnosticSession.start() as session:
    orchestrator = Orchestrator(session)
    report = await orchestrator.diagnose(
        url="https://example.com",
        symptoms=[Symptom.SLOW_PAGE],
    )
    for finding in report.findings:
        print(f"{finding.severity}: {finding.title}")

Requirements

  • Python 3.11+
  • Playwright (playwright install chromium)
  • Chrome or Edge (for launch-chrome / attach modes)

Full Feature List

See FEATURES.md for the complete technical feature reference.

Development

pip install -e ".[dev]"
playwright install chromium
pytest tests/
ruff check src/ tests/

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pagescope-0.2.0.tar.gz (144.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pagescope-0.2.0-py3-none-any.whl (145.6 kB view details)

Uploaded Python 3

File details

Details for the file pagescope-0.2.0.tar.gz.

File metadata

  • Download URL: pagescope-0.2.0.tar.gz
  • Upload date:
  • Size: 144.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pagescope-0.2.0.tar.gz
Algorithm Hash digest
SHA256 83f41be962f5109af9d76c43f0cbe6c7f5c89e41bca8bc54b86720fe2bfb9a99
MD5 3c6bcab6dae106a8a17da2d5a66e0c00
BLAKE2b-256 b9f530ea7f4e2f6d225a14d4ecd507513a1881cb9d2a652306c8b882fe5d8357

See more details on using hashes here.

File details

Details for the file pagescope-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pagescope-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 145.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pagescope-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 156379c296f4078d0667a39f0652b4e46aa563fbf0a27e9df307c87e001111f8
MD5 7972fa40aad1928f993a68361a47fa5f
BLAKE2b-256 5a341767abdba07ea50cc7f27d470a5c1378568dd5dc7ec9c150c9b7b4547f72

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page