cursorflow 1.3.7__py3-none-any.whl → 2.0.0__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.
@@ -0,0 +1,293 @@
1
+ Metadata-Version: 2.4
2
+ Name: cursorflow
3
+ Version: 2.0.0
4
+ Summary: 🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis
5
+ Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/haley-marketing-group/cursorflow
8
+ Project-URL: Documentation, https://cursorflow.readthedocs.io
9
+ Project-URL: Repository, https://github.com/haley-marketing-group/cursorflow
10
+ Keywords: ui-testing,automation,cursor,ai,web-testing,css-iteration,hot-reload,hmr,element-intelligence,page-analysis,error-context
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Testing
20
+ Classifier: Topic :: Software Development :: Quality Assurance
21
+ Classifier: Framework :: AsyncIO
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: playwright>=1.40.0
26
+ Requires-Dist: paramiko>=3.3.1
27
+ Requires-Dist: pyyaml>=6.0.1
28
+ Requires-Dist: asyncio-mqtt>=0.11.1
29
+ Requires-Dist: click>=8.1.7
30
+ Requires-Dist: rich>=13.6.0
31
+ Requires-Dist: jinja2>=3.1.2
32
+ Requires-Dist: python-dateutil>=2.8.2
33
+ Requires-Dist: watchdog>=3.0.0
34
+ Requires-Dist: docker>=6.1.3
35
+ Requires-Dist: pillow>=10.0.0
36
+ Requires-Dist: numpy>=1.24.0
37
+ Requires-Dist: websockets>=11.0.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
40
+ Requires-Dist: pytest-asyncio>=0.21.1; extra == "dev"
41
+ Requires-Dist: black>=23.9.1; extra == "dev"
42
+ Requires-Dist: flake8>=6.1.0; extra == "dev"
43
+ Requires-Dist: mypy>=1.6.1; extra == "dev"
44
+ Dynamic: license-file
45
+
46
+ # CursorFlow
47
+
48
+ **Complete page intelligence for AI-driven development**
49
+
50
+ CursorFlow captures comprehensive data from web applications - DOM structure, CSS properties, network activity, console logs, and performance metrics - enabling AI agents like Cursor to make intelligent decisions about UI improvements and debugging.
51
+
52
+ ## 🎯 What CursorFlow Does
53
+
54
+ **Data Collection, Not Analysis** - We gather structured data, AI makes the decisions.
55
+
56
+ ### **📊 Complete Page Intelligence**
57
+ Every screenshot captures everything:
58
+ - **DOM**: All elements with 7 selector strategies each
59
+ - **Network**: All requests, responses, and complete response bodies
60
+ - **Console**: All logs, errors, and smart error correlation
61
+ - **Performance**: Load times, memory usage, with reliability indicators
62
+ - **Visual**: Screenshots with pixel-perfect comparisons
63
+ - **Fonts**: Loading status, performance, and usage analysis
64
+ - **Animations**: Active animations and transitions tracking
65
+ - **Resources**: Complete resource loading analysis
66
+ - **Storage**: localStorage, sessionStorage, cookies, IndexedDB state
67
+
68
+ ### **🔄 Rapid Iteration Support**
69
+ - **Hot Reload Intelligence** with framework auto-detection (Vite, Webpack, Next.js, Parcel, Laravel Mix)
70
+ - **Mockup comparison** with enhanced DOM and CSS analysis
71
+ - **Hot reload integration** for instant, perfectly-timed CSS testing
72
+ - **Persistent sessions** that survive code changes
73
+ - **Universal framework support** (React, Vue, PHP, Perl, anything)
74
+
75
+ ### **🤖 AI-First Design**
76
+ All data structured for AI consumption:
77
+ - Consistent JSON format across all features
78
+ - **Multi-selector element identification** for robust automation
79
+ - **Accessibility-aware** element analysis
80
+ - Error correlation with **smart screenshot deduplication**
81
+ - Performance insights with **reliability metadata**
82
+ - **HMR event correlation** for CSS change tracking
83
+
84
+ ## 🚀 Quick Start
85
+
86
+ ```bash
87
+ # Install CursorFlow
88
+ pip install cursorflow
89
+
90
+ # Test with complete intelligence
91
+ cursorflow test --base-url http://localhost:3000 --actions '[
92
+ {"navigate": "/dashboard"},
93
+ {"wait_for": "#main-content"},
94
+ {"screenshot": "dashboard-loaded"}
95
+ ]'
96
+
97
+ # HMR-powered CSS iteration
98
+ cursorflow iterate-mockup https://mockup.com/design \
99
+ --base-url http://localhost:5173 \
100
+ --css-improvements '[
101
+ {"name": "fix-spacing", "css": ".container { gap: 2rem; }"}
102
+ ]'
103
+ ```
104
+
105
+ ## 💻 Usage Examples
106
+
107
+ ### **Hot Reload Intelligence**
108
+ ```python
109
+ from cursorflow import CursorFlow
110
+
111
+ async def hmr_workflow():
112
+ flow = CursorFlow("http://localhost:5173", {"headless": False})
113
+
114
+ # Start HMR monitoring (auto-detects Vite/Webpack/Next.js)
115
+ await flow.browser.start_hmr_monitoring()
116
+
117
+ # Take baseline
118
+ await flow.execute_and_collect([
119
+ {"navigate": "/app"},
120
+ {"screenshot": "baseline"}
121
+ ])
122
+
123
+ # Wait for CSS changes with perfect timing
124
+ hmr_event = await flow.browser.wait_for_css_update()
125
+ print(f"🔥 {hmr_event['framework']} CSS update detected!")
126
+
127
+ # Capture immediately after change
128
+ await flow.execute_and_collect([
129
+ {"screenshot": "updated"}
130
+ ])
131
+ ```
132
+
133
+ ### **Advanced Element Analysis**
134
+ ```python
135
+ # Get comprehensive element data
136
+ results = await flow.execute_and_collect([
137
+ {"navigate": "/form"},
138
+ {"screenshot": "form-analysis"}
139
+ ])
140
+
141
+ # Access enhanced element data
142
+ for element in results['artifacts']['screenshots'][0]['dom_analysis']['elements']:
143
+ print(f"Element: {element['selector']}")
144
+ print(f" 7 Selectors: {list(element['selectors'].keys())}")
145
+ print(f" Accessible: {element['accessibility']['role']}")
146
+ print(f" Interactive: {element['accessibility']['interactive']}")
147
+ print(f" Visible: {element['visual_context']['visibility']['is_visible']}")
148
+ ```
149
+
150
+ ### **Comprehensive Page Intelligence**
151
+ ```python
152
+ # Get complete page analysis
153
+ screenshot = results['artifacts']['screenshots'][0]
154
+
155
+ # Complete Intelligence
156
+ print(f"Fonts loaded: {screenshot['font_status']['loadedFonts']}")
157
+ print(f"Animations running: {screenshot['animation_status']['runningAnimations']}")
158
+ print(f"Resources: {screenshot['resource_status']['totalResources']}")
159
+ print(f"Storage items: {screenshot['storage_status']['localStorage']['itemCount']}")
160
+ ```
161
+
162
+ ### **Smart Error Diagnostics**
163
+ ```python
164
+ # Enhanced error context with deduplication
165
+ error_context = await flow.browser.capture_interaction_error_context(
166
+ action_description="Submit form",
167
+ error_details={"type": "validation_error"}
168
+ )
169
+
170
+ print(f"Screenshot: {error_context['screenshot_info']['path']}")
171
+ print(f"Reused: {error_context['screenshot_info']['is_reused']}") # Smart deduplication
172
+ print(f"Context: {len(error_context['recent_actions'])} recent actions")
173
+ ```
174
+
175
+ ## 🔧 CLI Commands
176
+
177
+ ### **Universal Testing with Complete Intelligence**
178
+ ```bash
179
+ # Simple page test with full intelligence
180
+ cursorflow test --base-url http://localhost:3000 --path "/dashboard"
181
+
182
+ # Complex interaction test
183
+ cursorflow test --base-url http://localhost:3000 --actions '[
184
+ {"navigate": "/login"},
185
+ {"fill": {"selector": "#email", "value": "test@example.com"}},
186
+ {"click": "#login-btn"},
187
+ {"wait_for": ".dashboard"},
188
+ {"screenshot": "logged-in"}
189
+ ]'
190
+ ```
191
+
192
+ ### **HMR-Powered CSS Iteration**
193
+ ```bash
194
+ # Perfect CSS iteration with HMR intelligence
195
+ cursorflow iterate-mockup https://mockup.com/design \
196
+ --base-url http://localhost:5173 \
197
+ --css-improvements '[
198
+ {"name": "improve-spacing", "css": ".container { gap: 2rem; }"},
199
+ {"name": "enhance-colors", "css": ".button { background: #007bff; }"}
200
+ ]'
201
+ ```
202
+
203
+ ### **Enhanced Design Comparison**
204
+ ```bash
205
+ # Compare with comprehensive intelligence
206
+ cursorflow compare-mockup https://mockup.com/design \
207
+ --base-url http://localhost:3000 \
208
+ --mockup-actions '[{"navigate": "/"}]' \
209
+ --implementation-actions '[{"navigate": "/dashboard"}]'
210
+ ```
211
+
212
+ ## 🧠 AI Integration
213
+
214
+ ### **Cursor Rules (Auto-Install)**
215
+ ```bash
216
+ # Install AI assistance rules
217
+ cursorflow install-rules
218
+ ```
219
+
220
+ CursorFlow includes comprehensive rules that teach Cursor:
221
+ - **When to use HMR intelligence** for CSS iteration
222
+ - **How to analyze multi-selector element data**
223
+ - **Best practices for comprehensive page analysis**
224
+ - **Error debugging with smart context collection**
225
+
226
+ ### **Structured Data for AI**
227
+ Every CursorFlow operation returns **perfectly structured JSON** optimized for AI analysis:
228
+
229
+ ```json
230
+ {
231
+ "artifacts": {
232
+ "screenshots": [{
233
+ "path": ".cursorflow/artifacts/screenshots/dashboard_123.png",
234
+ "dom_analysis": {
235
+ "elements": [...], // 7 selectors + accessibility per element
236
+ "pageStructure": {...}, // Enhanced page analysis
237
+ "analysisVersion": "2.0" // Version tracking
238
+ },
239
+ "font_status": {...}, // Font loading intelligence
240
+ "animation_status": {...}, // Animation tracking
241
+ "resource_status": {...}, // Resource analysis
242
+ "storage_status": {...}, // Storage state
243
+ "hmr_status": {...} // HMR event data
244
+ }]
245
+ }
246
+ }
247
+ ```
248
+
249
+ ## 🌟 Framework Support
250
+
251
+ **HMR Auto-Detection:**
252
+ - ✅ **Vite** (port 5173, WebSocket `/__vite_hmr`)
253
+ - ✅ **Webpack Dev Server** (port 3000, WebSocket `/sockjs-node`)
254
+ - ✅ **Next.js** (port 3000, WebSocket `/_next/webpack-hmr`)
255
+ - ✅ **Parcel** (port 1234, WebSocket `/hmr`)
256
+ - ✅ **Laravel Mix** (port 3000, WebSocket `/browser-sync/socket.io`)
257
+
258
+ **Universal Compatibility:**
259
+ - Works with **any web application** regardless of framework
260
+ - **Framework-agnostic** core operations
261
+ - **Smart adaptation** to different development environments
262
+
263
+ ## 📖 Documentation
264
+
265
+ - **[Complete User Manual](docs/USER_MANUAL.md)** - Full feature guide
266
+ - **[Examples](examples/)** - Practical usage examples
267
+ - **[API Reference](docs/api/)** - Complete Python API documentation
268
+
269
+ ## 🚀 Why CursorFlow?
270
+
271
+ ### **For Developers:**
272
+ - **Faster CSS iteration** with HMR precision timing
273
+ - **Complete element intelligence** with multi-selector strategies
274
+ - **Full page visibility** with comprehensive analysis
275
+ - **Smart error debugging** with rich context collection
276
+
277
+ ### **For AI Agents:**
278
+ - **Perfect structured data** for intelligent decision making
279
+ - **Multi-selector reliability** for robust automation
280
+ - **Accessibility awareness** for inclusive development
281
+ - **HMR correlation** for understanding change impact
282
+
283
+ ### **For Teams:**
284
+ - **Framework agnostic** - works with any web technology
285
+ - **Production ready** - handles real-world complexity
286
+ - **Comprehensive testing** - covers all aspects of web apps
287
+ - **AI-first design** - built for autonomous development
288
+
289
+ ---
290
+
291
+ **Complete page intelligence for AI-driven development with CursorFlow**
292
+
293
+ *Hot reload precision • Advanced element analysis • Smart error diagnostics • Comprehensive page intelligence*
@@ -5,27 +5,30 @@ cursorflow/install_cursorflow_rules.py,sha256=ny4c-S1O-V2sITunZO2kk6sCf1yec42UJO
5
5
  cursorflow/updater.py,sha256=pvbSZgg6hgWZBE5AAUPppS5Yzv0yNMp2X_CL2GALg_w,18783
6
6
  cursorflow/core/agent.py,sha256=f3lecgEzDRDdGTVccAtorpLGfNJJ49bbsQAmgr0vNGg,10136
7
7
  cursorflow/core/auth_handler.py,sha256=oRafO6ZdxoHryBIvHsrNV8TECed4GXpJsdEiH0KdPPk,17149
8
- cursorflow/core/browser_controller.py,sha256=fqbCAXyPXY8_k1gNNwETjNVVPfLSNdGLOcGvpHUkMV4,59333
8
+ cursorflow/core/browser_controller.py,sha256=OII52LBgN97-G-6mPCiqbFGbHnU9KtHaYB0qeylqo2U,125963
9
9
  cursorflow/core/browser_engine.py,sha256=Glq8U_bXRkO2Yal0nku7Z2wKwOftY4So2XN4oy56WLo,13732
10
10
  cursorflow/core/css_iterator.py,sha256=whLCIwbHZEWaH1HCbmqhNX5zrh_fL-r3hsxKjYsukcE,16478
11
11
  cursorflow/core/cursor_integration.py,sha256=MAeHjXYeqzaXnhskqkTDB-n5ixIHqapGe93X0lLKhws,67501
12
12
  cursorflow/core/cursorflow.py,sha256=GohWXvCLTsIIxI2UBRkFPM3yptbPNw4wI1vxKRPPMd0,31816
13
+ cursorflow/core/error_context_collector.py,sha256=so-aveqwb6_vRDbtKR2ln8_F84aaVIceNi1UHsaVPgc,26196
13
14
  cursorflow/core/error_correlator.py,sha256=g6YaIF2yFXUDrTuWHCyuES6K0696H8LDWmXH1qI8ddA,13367
14
15
  cursorflow/core/event_correlator.py,sha256=lCzXFnii17AQt3rOVOclez_AnjvBCF_2ZlnFG0mIN6c,7808
15
16
  cursorflow/core/file_change_monitor.py,sha256=tl_ZdsGW8LZBTImniD-lqaGgNb9dYjlDsP2XmevE0xk,21258
17
+ cursorflow/core/hmr_detector.py,sha256=IrGYhXIeTBukffRXF74SW45cB_Im0cmq8RxxjtSz-2w,17431
16
18
  cursorflow/core/log_collector.py,sha256=vZ2Slm6C_OOi68xROWpXPSZqzzQAWK0sk5xEybGlA4w,14217
17
19
  cursorflow/core/log_monitor.py,sha256=pONMu_JHEnT0T62OA5KRZ4nClzKgNpifPyrfN5w_RM8,6704
18
20
  cursorflow/core/mockup_comparator.py,sha256=VLfEEaTgbcY0oTb-bhBD2uTbXGjbnOV7LXNVvXpWMrM,64695
19
21
  cursorflow/core/persistent_session.py,sha256=FsEHj4wKkycmdp6PFRHv3g333Y74yqra0x_qhUTQpik,36075
20
22
  cursorflow/core/report_generator.py,sha256=-vosfyrnfVyWDbAIMlMurl90xOXqBae8d6aLd9sEqiY,10113
23
+ cursorflow/core/trace_manager.py,sha256=Jj9ultZrL1atiZXfcRVI6ynCnnfqZM-X0_taxt-llJ0,7189
21
24
  cursorflow/log_sources/local_file.py,sha256=Hn3hDQjAqgNBQN8b5AbC6IQAzgY_ekLgePwDuq9wBlA,7101
22
25
  cursorflow/log_sources/ssh_remote.py,sha256=zSnX8mpa5G86UDWEm3_FqYwo1PjBW67C1LPkJ5Ta_ho,7482
23
26
  cursorflow/rules/__init__.py,sha256=gPcA-IkhXj03sl7cvZV0wwo7CtEkcyuKs4y0F5oQbqE,458
24
27
  cursorflow/rules/cursorflow-installation.mdc,sha256=Nnu7PuP5nGD6hGAV_x2SX5Y2_uPz3oNA5XUjNJBFC1M,6985
25
28
  cursorflow/rules/cursorflow-usage.mdc,sha256=Zv0TWuo7S3iJHq8R6oBaHRI3V6h-T81pdb7vi-b8NoU,14157
26
- cursorflow-1.3.7.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
27
- cursorflow-1.3.7.dist-info/METADATA,sha256=ViqtojUrMloBzdc_FQgTysm-OJkeLVnyw3rRBO7AD-Y,7716
28
- cursorflow-1.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
- cursorflow-1.3.7.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
30
- cursorflow-1.3.7.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
31
- cursorflow-1.3.7.dist-info/RECORD,,
29
+ cursorflow-2.0.0.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
30
+ cursorflow-2.0.0.dist-info/METADATA,sha256=umhLvqBVKOkvvJ0as3gfKDGmd-KW2POSW8c1nHovBAk,10656
31
+ cursorflow-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
+ cursorflow-2.0.0.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
33
+ cursorflow-2.0.0.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
34
+ cursorflow-2.0.0.dist-info/RECORD,,
@@ -1,249 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: cursorflow
3
- Version: 1.3.7
4
- Summary: Complete page intelligence for AI-driven development - captures DOM, network, console, and performance data
5
- Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/haley-marketing-group/cursorflow
8
- Project-URL: Documentation, https://cursorflow.readthedocs.io
9
- Project-URL: Repository, https://github.com/haley-marketing-group/cursorflow
10
- Keywords: ui-testing,automation,cursor,ai,web-testing,css-iteration
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Software Development :: Testing
20
- Classifier: Topic :: Software Development :: Quality Assurance
21
- Classifier: Framework :: AsyncIO
22
- Requires-Python: >=3.8
23
- Description-Content-Type: text/markdown
24
- License-File: LICENSE
25
- Requires-Dist: playwright>=1.40.0
26
- Requires-Dist: paramiko>=3.3.1
27
- Requires-Dist: pyyaml>=6.0.1
28
- Requires-Dist: asyncio-mqtt>=0.11.1
29
- Requires-Dist: click>=8.1.7
30
- Requires-Dist: rich>=13.6.0
31
- Requires-Dist: jinja2>=3.1.2
32
- Requires-Dist: python-dateutil>=2.8.2
33
- Requires-Dist: watchdog>=3.0.0
34
- Requires-Dist: docker>=6.1.3
35
- Requires-Dist: pillow>=10.0.0
36
- Requires-Dist: numpy>=1.24.0
37
- Provides-Extra: dev
38
- Requires-Dist: pytest>=7.4.0; extra == "dev"
39
- Requires-Dist: pytest-asyncio>=0.21.1; extra == "dev"
40
- Requires-Dist: black>=23.9.1; extra == "dev"
41
- Requires-Dist: flake8>=6.1.0; extra == "dev"
42
- Requires-Dist: mypy>=1.6.1; extra == "dev"
43
- Dynamic: license-file
44
-
45
- # CursorFlow
46
-
47
- **Complete page intelligence for AI-driven development**
48
-
49
- CursorFlow captures comprehensive data from web applications - DOM structure, CSS properties, network activity, console logs, and performance metrics - enabling AI agents like Cursor to make intelligent decisions about UI improvements and debugging.
50
-
51
- ## 🎯 What CursorFlow Does
52
-
53
- **Data Collection, Not Analysis** - We gather structured data, AI makes the decisions.
54
-
55
- ### **📊 Complete Page Intelligence**
56
- Every screenshot captures everything:
57
- - **DOM**: All elements with exact CSS properties
58
- - **Network**: All requests, responses, and timing
59
- - **Console**: All logs, errors, and warnings
60
- - **Performance**: Load times, memory usage, metrics
61
- - **Visual**: Screenshots and pixel-perfect comparisons
62
-
63
- ### **🔄 Rapid Iteration Support**
64
- - **Mockup comparison** with pixel-level analysis
65
- - **Hot reload integration** for instant CSS testing
66
- - **Persistent sessions** that survive code changes
67
- - **Universal framework support** (React, Vue, PHP, Perl, anything)
68
-
69
- ### **🤖 AI-First Design**
70
- All data structured for AI consumption:
71
- - Consistent JSON format across all features
72
- - Element-level CSS properties for precise modifications
73
- - Error correlation with timing data
74
- - Performance insights with actionable metrics
75
-
76
- ## 🚀 Quick Start
77
-
78
- ```bash
79
- # Install
80
- pip install cursorflow
81
-
82
- # Test any page - captures everything automatically
83
- cursorflow test --base-url http://localhost:3000 --actions '[
84
- {"navigate": "/dashboard"},
85
- {"wait_for": "#main-content"},
86
- {"screenshot": "dashboard-loaded"}
87
- ]'
88
-
89
- # Compare mockup to implementation
90
- cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
91
- ```
92
-
93
- ## 💻 Usage Examples
94
-
95
- ### **Basic Testing**
96
- ```python
97
- from cursorflow import CursorFlow
98
-
99
- flow = CursorFlow(base_url="http://localhost:3000")
100
-
101
- # Every screenshot includes complete page data
102
- results = await flow.execute_and_collect([
103
- {"navigate": "/dashboard"},
104
- {"screenshot": "loaded"} # Captures DOM, network, console, performance
105
- ])
106
-
107
- # Access structured data for AI analysis
108
- screenshot = results['artifacts']['screenshots'][0]
109
- elements = screenshot['dom_analysis']['elements'] # All elements + CSS
110
- network = screenshot['network_data'] # All requests + timing
111
- console = screenshot['console_data'] # All logs + errors
112
- ```
113
-
114
- ### **Mockup Comparison**
115
- ```python
116
- # Compare design to implementation with complete element data
117
- results = await flow.compare_mockup_to_implementation(
118
- mockup_url="https://mockup.com/design",
119
- implementation_url="http://localhost:3000/dashboard"
120
- )
121
-
122
- # AI gets exact differences and CSS properties for every element
123
- differences = results['layout_analysis']['element_differences']
124
- ```
125
-
126
- ### **CSS Iteration**
127
- ```python
128
- # Test CSS changes with hot reload - no page refresh needed
129
- css_changes = [
130
- {"name": "spacing", "css": ".container { gap: 2rem; }"},
131
- {"name": "colors", "css": ".button { background: blue; }"}
132
- ]
133
-
134
- results = await flow.css_iteration_persistent(
135
- base_actions=[{"navigate": "/page"}],
136
- css_changes=css_changes
137
- )
138
- ```
139
-
140
- ## 🔧 CLI Commands
141
-
142
- ```bash
143
- # Test any page with custom actions
144
- cursorflow test --base-url http://localhost:3000 --actions '[
145
- {"navigate": "/login"},
146
- {"fill": {"selector": "#username", "value": "test@example.com"}},
147
- {"fill": {"selector": "#password", "value": "password123"}},
148
- {"click": "#login-button"},
149
- {"wait_for": ".dashboard"},
150
- {"screenshot": "logged-in"}
151
- ]'
152
-
153
- # Simple page test (just navigate and screenshot)
154
- cursorflow test --base-url http://localhost:3000 --path "/dashboard"
155
-
156
- # Compare mockup to implementation
157
- cursorflow compare-mockup https://mockup.com/design \
158
- --base-url http://localhost:3000 \
159
- --viewports '[{"width": 1440, "height": 900, "name": "desktop"}]'
160
-
161
- # Iterate on CSS improvements
162
- cursorflow iterate-mockup https://mockup.com/design \
163
- --base-url http://localhost:3000 \
164
- --css-improvements '[
165
- {"name": "spacing", "css": ".container { gap: 2rem; }"},
166
- {"name": "colors", "css": ".button { background: blue; }"}
167
- ]'
168
- ```
169
-
170
- ## 🌐 Universal Framework Support
171
-
172
- Works with any web technology:
173
- - **Modern**: React, Vue, Angular, Next.js, Svelte
174
- - **Traditional**: PHP, Django, Rails, Laravel
175
- - **Legacy**: Perl, mod_perl, OpenSAS, Classic ASP
176
- - **Any URL**: Local development, staging, production
177
-
178
- ## 📊 What AI Gets
179
-
180
- ### **Complete Element Data**
181
- ```json
182
- {
183
- "tagName": "button",
184
- "textContent": "Save Changes",
185
- "boundingBox": {"x": 100, "y": 200, "width": 120, "height": 40},
186
- "computedStyles": {
187
- "backgroundColor": "rgb(0, 123, 255)",
188
- "fontSize": "14px",
189
- "padding": "8px 16px",
190
- "borderRadius": "4px"
191
- }
192
- }
193
- ```
194
-
195
- ### **Network Activity**
196
- ```json
197
- {
198
- "network_summary": {
199
- "total_requests": 23,
200
- "failed_requests": 2,
201
- "average_response_time": 145.5
202
- },
203
- "failed_requests": [
204
- {"url": "/api/data", "status": 404, "timing": 1250}
205
- ]
206
- }
207
- ```
208
-
209
- ### **Console Intelligence**
210
- ```json
211
- {
212
- "console_summary": {
213
- "error_count": 1,
214
- "warning_count": 2
215
- },
216
- "errors": [
217
- {"text": "Cannot read property 'id' of undefined", "location": "app.js:42"}
218
- ]
219
- }
220
- ```
221
-
222
- ## 📚 Documentation
223
-
224
- **[📖 Complete User Manual](docs/USER_MANUAL.md)** - Everything you need:
225
- - Installation and setup
226
- - All features and examples
227
- - CLI commands and Python API
228
- - Troubleshooting guide
229
-
230
- ## 🎯 Perfect for AI Development
231
-
232
- CursorFlow is designed specifically for AI agents:
233
- - **Complete data collection** - AI gets full context
234
- - **Structured output** - Consistent JSON format
235
- - **No analysis** - We collect, AI decides
236
- - **Rapid iteration** - Fast feedback loops
237
- - **Universal compatibility** - Works with any web app
238
-
239
- ## Installation
240
-
241
- ```bash
242
- pip install cursorflow
243
- ```
244
-
245
- Browser dependencies install automatically on first use.
246
-
247
- ---
248
-
249
- **CursorFlow: The data collection engine that powers AI-driven web development.** 🚀