webtap-tool 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of webtap-tool might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtap-tool
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Terminal-based web page inspector for AI debugging sessions
5
5
  Author-email: Fredrik Angelsen <fredrikangelsen@gmail.com>
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -25,69 +25,148 @@ Requires-Dist: websocket-client>=1.8.0
25
25
  Requires-Dist: websockets>=15.0.1
26
26
  Description-Content-Type: text/markdown
27
27
 
28
- # WebTap
28
+ # webtap
29
29
 
30
30
  Browser debugging via Chrome DevTools Protocol with native event storage and dynamic querying.
31
31
 
32
- ## Overview
32
+ ## ✨ Features
33
33
 
34
- WebTap connects to Chrome's debugging protocol and stores CDP events as-is in DuckDB, enabling powerful SQL queries and dynamic field discovery without complex transformations.
34
+ - 🔍 **Native CDP Storage** - Events stored exactly as received in DuckDB
35
+ - 🎯 **Dynamic Field Discovery** - Automatically indexes all field paths from events
36
+ - 🚫 **Smart Filtering** - Built-in filters for ads, tracking, analytics noise
37
+ - 📊 **SQL Querying** - Direct DuckDB access for complex analysis
38
+ - 🔌 **MCP Ready** - Tools and resources for Claude/LLMs
39
+ - 🎨 **Rich Display** - Tables, alerts, and formatted output
40
+ - 🐍 **Python Inspection** - Full Python environment for data exploration
35
41
 
36
- ## Key Features
42
+ ## 📋 Prerequisites
37
43
 
38
- - **Native CDP Storage** - Events stored exactly as received in DuckDB
39
- - **Dynamic Field Discovery** - Automatically indexes all field paths from events
40
- - **Smart Filtering** - Built-in filters for ads, tracking, analytics noise
41
- - **SQL Querying** - Direct DuckDB access for complex analysis
42
- - **Chrome Extension** - Visual page selector and connection management
43
- - **Python Inspection** - Full Python environment for data exploration
44
-
45
- ## Installation
44
+ Required system dependencies:
45
+ - **google-chrome-stable** or **chromium** - Browser with DevTools Protocol support
46
46
 
47
47
  ```bash
48
- # Install with uv
49
- uv tool install webtap
48
+ # macOS
49
+ brew install --cask google-chrome
50
+
51
+ # Ubuntu/Debian
52
+ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
53
+ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
54
+ sudo apt update
55
+ sudo apt install google-chrome-stable
50
56
 
51
- # Or from source
52
- cd packages/webtap
53
- uv sync
57
+ # Arch Linux
58
+ yay -S google-chrome # or google-chrome-stable from AUR
59
+
60
+ # Fedora
61
+ sudo dnf install google-chrome-stable
54
62
  ```
55
63
 
56
- ## Quick Start
64
+ ## 📦 Installation
57
65
 
58
- 1. **Start Chrome with debugging**
59
66
  ```bash
60
- # macOS
61
- /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
67
+ # Install via uv tool (recommended)
68
+ uv tool install webtap-tool
62
69
 
63
- # Linux
64
- google-chrome --remote-debugging-port=9222
70
+ # Or with pipx
71
+ pipx install webtap-tool
65
72
 
66
- # Windows
67
- chrome.exe --remote-debugging-port=9222
73
+ # Update to latest
74
+ uv tool upgrade webtap-tool
75
+
76
+ # Uninstall
77
+ uv tool uninstall webtap-tool
68
78
  ```
69
79
 
70
- 2. **Launch WebTap**
80
+ ## 🚀 Quick Start
81
+
71
82
  ```bash
83
+ # 1. Install webtap
84
+ uv tool install webtap-tool
85
+
86
+ # 2. Optional: Setup helpers (first time only)
87
+ webtap --cli setup-filters # Download default filter configurations
88
+ webtap --cli setup-extension # Download Chrome extension files
89
+ webtap --cli setup-chrome # Install Chrome wrapper for debugging
90
+
91
+ # 3. Launch Chrome with debugging
92
+ webtap --cli run-chrome # Or manually: google-chrome-stable --remote-debugging-port=9222
93
+
94
+ # 4. Start webtap REPL
72
95
  webtap
73
96
 
74
- # You'll see:
75
- ================================================================================
76
- WebTap - Chrome DevTools Protocol REPL
77
- --------------------------------------------------------------------------------
78
- Type help() for available commands
79
- >>>
97
+ # 5. Connect and explore
98
+ >>> pages() # List available Chrome pages
99
+ >>> connect(0) # Connect to first page
100
+ >>> network() # View network requests (filtered)
101
+ >>> console() # View console messages
102
+ >>> events({"url": "*api*"}) # Query any CDP field dynamically
80
103
  ```
81
104
 
82
- 3. **Connect and explore**
105
+ ## 🔌 MCP Setup for Claude
106
+
107
+ ```bash
108
+ # Quick setup with Claude CLI
109
+ claude mcp add webtap -- webtap --mcp
110
+ ```
111
+
112
+ Or manually configure Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "webtap": {
117
+ "command": "webtap",
118
+ "args": ["--mcp"]
119
+ }
120
+ }
121
+ }
122
+ ```
123
+
124
+ ## 🎮 Usage
125
+
126
+ ### Interactive REPL
127
+ ```bash
128
+ webtap # Start REPL
129
+ webtap --mcp # Start as MCP server
130
+ ```
131
+
132
+ ### CLI Commands
133
+ ```bash
134
+ webtap --cli setup-filters # Download filter configurations
135
+ webtap --cli setup-extension # Download Chrome extension
136
+ webtap --cli setup-chrome # Install Chrome wrapper script
137
+ webtap --cli run-chrome # Launch Chrome with debugging
138
+ webtap --cli --help # Show all CLI commands
139
+ ```
140
+
141
+ ### Commands
83
142
  ```python
84
143
  >>> pages() # List available Chrome pages
85
144
  >>> connect(0) # Connect to first page
86
145
  >>> network() # View network requests (filtered)
87
146
  >>> console() # View console messages
88
147
  >>> events({"url": "*api*"}) # Query any CDP field dynamically
148
+ >>> body(50) # Get response body
149
+ >>> inspect(49) # View event details
150
+ >>> js("document.title") # Execute JavaScript
89
151
  ```
90
152
 
153
+ ### Command Reference
154
+
155
+ | Command | Description |
156
+ |---------|------------|
157
+ | `pages()` | List available Chrome pages |
158
+ | `connect(page=0)` | Connect to page by index |
159
+ | `disconnect()` | Disconnect from current page |
160
+ | `navigate(url)` | Navigate to URL |
161
+ | `network(no_filters=False)` | View network requests |
162
+ | `console()` | View console messages |
163
+ | `events(filters)` | Query events dynamically |
164
+ | `inspect(rowid, expr=None)` | Inspect event details |
165
+ | `body(response_id, expr=None)` | Get response body |
166
+ | `js(code, wait_return=True)` | Execute JavaScript |
167
+ | `filters(action="list")` | Manage noise filters |
168
+ | `clear(events=True)` | Clear events/console/cache |
169
+
91
170
  ## Core Commands
92
171
 
93
172
  ### Connection & Navigation
@@ -392,20 +471,41 @@ WebTap includes aggressive default filters to reduce noise. Customize in `.webta
392
471
  - Python 3.12+
393
472
  - Dependencies: websocket-client, duckdb, replkit2, fastapi, uvicorn, beautifulsoup4
394
473
 
395
- ## Development
474
+ ## 🏗️ Architecture
475
+
476
+ Built on [ReplKit2](https://github.com/angelsen/replkit2) for dual REPL/MCP functionality.
477
+
478
+ **Key Design:**
479
+ - **Store AS-IS** - No transformation of CDP events
480
+ - **Query On-Demand** - Extract only what's needed
481
+ - **Dynamic Discovery** - No predefined schemas
482
+ - **SQL-First** - Leverage DuckDB's JSON capabilities
483
+ - **Minimal Memory** - Store only CDP data
484
+
485
+ ## 📚 Documentation
486
+
487
+ - [Architecture](ARCHITECTURE.md) - System design
488
+ - [Vision](src/webtap/VISION.md) - Design philosophy
489
+ - [Services](src/webtap/services/) - Service layer implementations
490
+ - [Commands](src/webtap/commands/) - Command implementations
491
+
492
+ ## 🛠️ Development
396
493
 
397
494
  ```bash
398
- # Run from source
399
- cd packages/webtap
400
- uv run webtap
495
+ # Clone repository
496
+ git clone https://github.com/angelsen/tap-tools
497
+ cd tap-tools
498
+
499
+ # Install for development
500
+ uv sync --package webtap
401
501
 
402
- # API server starts automatically on port 8765
403
- # Chrome extension connects to http://localhost:8765
502
+ # Run development version
503
+ uv run --package webtap webtap
404
504
 
405
- # Type checking and linting
406
- basedpyright packages/webtap/src/webtap
407
- ruff check --fix packages/webtap/src/webtap
408
- ruff format packages/webtap/src/webtap
505
+ # Run tests and checks
506
+ make check-webtap # Check build
507
+ make format # Format code
508
+ make lint # Fix linting
409
509
  ```
410
510
 
411
511
  ## API Server
@@ -422,6 +522,6 @@ WebTap automatically starts a FastAPI server on port 8765 for Chrome extension i
422
522
 
423
523
  The API server runs in a background thread and doesn't block the REPL.
424
524
 
425
- ## License
525
+ ## 📄 License
426
526
 
427
- MIT - See [LICENSE](../../LICENSE) for details.
527
+ MIT - see [LICENSE](../../LICENSE) for details.
@@ -37,7 +37,7 @@ webtap/services/fetch.py,sha256=hKrhFda1x65GmLHO0XMkxbclMtkWt0uEv7Rp9Ui2na0,1362
37
37
  webtap/services/main.py,sha256=HcXdPuI7hzsxsNvfN0npGhj_M7HObc83Lr3fuy7BMeE,5673
38
38
  webtap/services/network.py,sha256=EJZIlaE98v113xypPIiiTE-LiG-eCXGNXoJjzDYebhU,3480
39
39
  webtap/services/setup.py,sha256=DF2471WsY5pJ5gEn64EMGRW5t9mUyuTQoCTejOJeQxg,7594
40
- webtap_tool-0.1.1.dist-info/METADATA,sha256=QYQTlMAdoYseHUo742JZfunjHy6KjKlO89YvKZJDBSE,14277
41
- webtap_tool-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
- webtap_tool-0.1.1.dist-info/entry_points.txt,sha256=iFe575I0CIb1MbfPt0oX2VYyY5gSU_dA551PKVR83TU,39
43
- webtap_tool-0.1.1.dist-info/RECORD,,
40
+ webtap_tool-0.1.2.dist-info/METADATA,sha256=IZzOzUP2iPmmNVcjgBNLkAqy3lmF0aEpMLVb5DaV-pE,17457
41
+ webtap_tool-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
+ webtap_tool-0.1.2.dist-info/entry_points.txt,sha256=iFe575I0CIb1MbfPt0oX2VYyY5gSU_dA551PKVR83TU,39
43
+ webtap_tool-0.1.2.dist-info/RECORD,,