cursorflow 2.1.3__tar.gz → 2.1.5__tar.gz

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.
Files changed (48) hide show
  1. cursorflow-2.1.5/FIRST_TIME_SETUP.md +212 -0
  2. {cursorflow-2.1.3 → cursorflow-2.1.5}/MANIFEST.in +2 -0
  3. {cursorflow-2.1.3 → cursorflow-2.1.5}/PKG-INFO +18 -2
  4. cursorflow-2.1.5/POST_INSTALL_MESSAGE.txt +29 -0
  5. {cursorflow-2.1.3 → cursorflow-2.1.5}/README.md +17 -1
  6. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/__init__.py +1 -1
  7. cursorflow-2.1.5/cursorflow/auto_init.py +147 -0
  8. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/cli.py +24 -2
  9. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/install_cursorflow_rules.py +4 -4
  10. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/log_sources/local_file.py +7 -1
  11. cursorflow-2.1.5/cursorflow/post_install.py +46 -0
  12. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/rules/cursorflow-installation.mdc +31 -7
  13. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/rules/cursorflow-usage.mdc +71 -3
  14. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow.egg-info/SOURCES.txt +4 -0
  15. {cursorflow-2.1.3 → cursorflow-2.1.5}/pyproject.toml +4 -1
  16. {cursorflow-2.1.3 → cursorflow-2.1.5}/LICENSE +0 -0
  17. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/auto_updater.py +0 -0
  18. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/agent.py +0 -0
  19. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/auth_handler.py +0 -0
  20. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/browser_controller.py +0 -0
  21. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/browser_engine.py +0 -0
  22. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/css_iterator.py +0 -0
  23. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/cursor_integration.py +0 -0
  24. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/cursorflow.py +0 -0
  25. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/error_context_collector.py +0 -0
  26. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/error_correlator.py +0 -0
  27. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/event_correlator.py +0 -0
  28. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/file_change_monitor.py +0 -0
  29. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/hmr_detector.py +0 -0
  30. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/log_collector.py +0 -0
  31. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/log_monitor.py +0 -0
  32. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/mockup_comparator.py +0 -0
  33. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/persistent_session.py +0 -0
  34. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/report_generator.py +0 -0
  35. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/core/trace_manager.py +0 -0
  36. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/log_sources/ssh_remote.py +0 -0
  37. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/rules/__init__.py +0 -0
  38. {cursorflow-2.1.3 → cursorflow-2.1.5}/cursorflow/updater.py +0 -0
  39. {cursorflow-2.1.3 → cursorflow-2.1.5}/docs/USER_MANUAL.md +0 -0
  40. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/comprehensive_screenshot_example.py +0 -0
  41. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/enhanced_screenshot_example.py +0 -0
  42. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/mockup_comparison_example.py +0 -0
  43. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/opensas_example.py +0 -0
  44. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/react_example.py +0 -0
  45. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/responsive_testing_example.py +0 -0
  46. {cursorflow-2.1.3 → cursorflow-2.1.5}/examples/v2_comprehensive_demo.py +0 -0
  47. {cursorflow-2.1.3 → cursorflow-2.1.5}/setup.cfg +0 -0
  48. {cursorflow-2.1.3 → cursorflow-2.1.5}/setup.py +0 -0
@@ -0,0 +1,212 @@
1
+ # CursorFlow First-Time Setup
2
+
3
+ ## 🎯 The Two-Step Installation Process
4
+
5
+ CursorFlow requires **two separate installations**:
6
+
7
+ ### 1️⃣ Package Installation (Global)
8
+ This installs the CursorFlow Python package and CLI tool into your Python environment:
9
+
10
+ ```bash
11
+ pip install cursorflow
12
+ playwright install chromium
13
+ ```
14
+
15
+ **What this gives you:**
16
+ - `cursorflow` command-line tool
17
+ - Python API for programmatic usage
18
+ - Core testing engine
19
+
20
+ ### 2️⃣ Project Initialization (Per-Project)
21
+ This sets up CursorFlow in your specific project:
22
+
23
+ ```bash
24
+ cd /path/to/your/project
25
+ cursorflow install-rules
26
+ ```
27
+
28
+ **What this creates:**
29
+ - `.cursor/rules/` - Cursor AI integration rules (tells Cursor how to use CursorFlow)
30
+ - `cursorflow-config.json` - Project-specific settings (base URL, log paths, etc.)
31
+ - `.cursorflow/` - Artifacts directory (screenshots, sessions, test results)
32
+ - `.gitignore` entries - Excludes CursorFlow artifacts from version control
33
+
34
+ ## 🤔 Why Two Steps?
35
+
36
+ **Think of it like Git:**
37
+ - `pip install cursorflow` = Installing the git CLI globally
38
+ - `cursorflow install-rules` = Running `git init` in each project
39
+
40
+ Each project needs its own CursorFlow configuration because:
41
+ - Different base URLs (localhost:3000 vs localhost:8000)
42
+ - Different log paths (Django logs vs React logs)
43
+ - Different authentication setups
44
+ - Different Cursor AI rules location per project
45
+
46
+ ## 🚀 Auto-Initialization
47
+
48
+ If you forget step 2, CursorFlow will detect it and offer to initialize automatically:
49
+
50
+ ```bash
51
+ $ cursorflow test --base-url http://localhost:3000
52
+
53
+ ⚠️ CursorFlow not initialized in this project
54
+ This is a one-time setup that creates:
55
+ • .cursor/rules/ (Cursor AI integration)
56
+ • cursorflow-config.json (project configuration)
57
+ • .cursorflow/ (artifacts directory)
58
+
59
+ 🚀 Initialize CursorFlow now? [Y/n]: y
60
+
61
+ ✅ CursorFlow is ready to use!
62
+ ```
63
+
64
+ ## 📋 What Happens During Project Initialization?
65
+
66
+ ### 1. Cursor AI Integration (`.cursor/rules/`)
67
+ Copies usage rules that teach Cursor AI how to use CursorFlow:
68
+ - `cursorflow-usage.mdc` - How to run tests and analyze results
69
+ - `cursorflow-installation.mdc` - Installation and setup guidance
70
+
71
+ ### 2. Configuration Template (`cursorflow-config.json`)
72
+ Auto-detects your project type and creates smart defaults:
73
+
74
+ ```json
75
+ {
76
+ "base_url": "http://localhost:3000",
77
+ "logs": {
78
+ "source": "local",
79
+ "paths": ["logs/app.log"]
80
+ },
81
+ "auth": {
82
+ "method": "form",
83
+ "username_selector": "#username",
84
+ "password_selector": "#password",
85
+ "submit_selector": "#login-button",
86
+ "session_storage": ".cursorflow/sessions/"
87
+ },
88
+ "browser": {
89
+ "headless": true,
90
+ "debug_mode": false
91
+ },
92
+ "_project_type": "react",
93
+ "_cursorflow_version": "2.1.5"
94
+ }
95
+ ```
96
+
97
+ ### 3. Project Structure
98
+ ```
99
+ your-project/
100
+ ├── .cursor/
101
+ │ └── rules/
102
+ │ ├── cursorflow-usage.mdc
103
+ │ └── cursorflow-installation.mdc
104
+ ├── .cursorflow/
105
+ │ ├── artifacts/
106
+ │ ├── sessions/
107
+ │ └── version_info.json
108
+ ├── cursorflow-config.json
109
+ └── .gitignore (updated with CursorFlow entries)
110
+ ```
111
+
112
+ ## 🎪 Common Scenarios
113
+
114
+ ### New Team Member Setup
115
+ ```bash
116
+ # They need both steps:
117
+ pip install cursorflow
118
+ playwright install chromium
119
+ cd /path/to/existing/project
120
+ # No need to run install-rules - config already exists!
121
+ ```
122
+
123
+ ### New Project
124
+ ```bash
125
+ # Full setup:
126
+ pip install cursorflow
127
+ playwright install chromium
128
+ cd /path/to/new/project
129
+ cursorflow install-rules
130
+ ```
131
+
132
+ ### Multiple Projects
133
+ ```bash
134
+ # Install once globally:
135
+ pip install cursorflow
136
+ playwright install chromium
137
+
138
+ # Initialize each project:
139
+ cd ~/projects/project-a && cursorflow install-rules
140
+ cd ~/projects/project-b && cursorflow install-rules
141
+ cd ~/projects/project-c && cursorflow install-rules
142
+ ```
143
+
144
+ ## 🔍 Verifying Setup
145
+
146
+ ### Check Package Installation
147
+ ```bash
148
+ cursorflow --version
149
+ # Should output: cursorflow, version 2.1.5
150
+ ```
151
+
152
+ ### Check Project Initialization
153
+ ```bash
154
+ # From project directory:
155
+ ls -la .cursor/rules/
156
+ # Should show: cursorflow-usage.mdc, cursorflow-installation.mdc
157
+
158
+ ls -la cursorflow-config.json
159
+ # Should exist
160
+
161
+ ls -la .cursorflow/
162
+ # Should exist
163
+ ```
164
+
165
+ ## 🚨 Troubleshooting
166
+
167
+ ### "Command not found: cursorflow"
168
+ **Problem:** Package not installed
169
+ **Solution:** `pip install cursorflow`
170
+
171
+ ### "CursorFlow not initialized in this project"
172
+ **Problem:** Project not initialized
173
+ **Solution:** `cursorflow install-rules`
174
+
175
+ ### "Cursor doesn't know about CursorFlow"
176
+ **Problem:** Rules not installed in project
177
+ **Solution:** `cursorflow install-rules` (creates `.cursor/rules/`)
178
+
179
+ ### "pip install worked but CursorFlow doesn't work"
180
+ **Problem:** Missing step 2
181
+ **Solution:** Run `cursorflow install-rules` in your project
182
+
183
+ ## 💡 Pro Tips
184
+
185
+ 1. **Add to your project README:**
186
+ ```markdown
187
+ ## Development Setup
188
+ ```bash
189
+ pip install -r requirements.txt
190
+ cursorflow install-rules # One-time CursorFlow setup
191
+ npm install
192
+ ```
193
+ ```
194
+
195
+ 2. **Add to onboarding checklist:**
196
+ - [ ] Clone repository
197
+ - [ ] Install dependencies
198
+ - [ ] **Run `cursorflow install-rules`** ← Don't forget!
199
+ - [ ] Run tests
200
+
201
+ 3. **Version control:**
202
+ - ✅ Commit `cursorflow-config.json` (team settings)
203
+ - ❌ Don't commit `.cursorflow/` (artifacts, generated per-developer)
204
+ - ✅ Commit `.cursor/rules/` (Cursor AI integration)
205
+
206
+ ## 🎯 Remember
207
+
208
+ **Package Installation = Global tool**
209
+ **Project Initialization = Per-project setup**
210
+
211
+ Just like `npm install -g typescript` vs `tsc --init`! 🚀
212
+
@@ -6,6 +6,8 @@ include README.md
6
6
  include LICENSE
7
7
  include pyproject.toml
8
8
  include setup.py
9
+ include FIRST_TIME_SETUP.md
10
+ include POST_INSTALL_MESSAGE.txt
9
11
 
10
12
  # INCLUDE: Core package code (automatically included by setuptools)
11
13
  recursive-include cursorflow *.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.1.3
3
+ Version: 2.1.5
4
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
5
  Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
6
  License-Expression: MIT
@@ -138,10 +138,26 @@ All data structured for AI consumption:
138
138
 
139
139
  ## 🚀 Quick Start
140
140
 
141
+ ### Step 1: Install CursorFlow Package
141
142
  ```bash
142
- # Install CursorFlow
143
143
  pip install cursorflow
144
+ playwright install chromium
145
+ ```
144
146
 
147
+ ### Step 2: Initialize Your Project (One-Time Setup)
148
+ ```bash
149
+ cd /path/to/your/project
150
+ cursorflow install-rules
151
+ ```
152
+
153
+ This creates:
154
+ - `.cursor/rules/` - Cursor AI integration rules
155
+ - `cursorflow-config.json` - Project-specific configuration
156
+ - `.cursorflow/` - Artifacts and session storage
157
+ - `.gitignore` entries for CursorFlow artifacts
158
+
159
+ ### Step 3: Start Testing
160
+ ```bash
145
161
  # Test real application behavior
146
162
  cursorflow test --base-url http://localhost:3000 --path "/dashboard"
147
163
 
@@ -0,0 +1,29 @@
1
+
2
+ ╔══════════════════════════════════════════════════════════════════════╗
3
+ ║ ║
4
+ ║ ✅ CursorFlow installed successfully! ║
5
+ ║ ║
6
+ ║ 📋 IMPORTANT: One more step to enable CursorFlow in your project ║
7
+ ║ ║
8
+ ║ Run this in your project directory: ║
9
+ ║ ║
10
+ ║ cd /path/to/your/project ║
11
+ ║ cursorflow install-rules ║
12
+ ║ ║
13
+ ║ This creates: ║
14
+ ║ • Cursor AI integration rules ║
15
+ ║ • Project-specific configuration ║
16
+ ║ • Artifacts directory structure ║
17
+ ║ ║
18
+ ║ 💡 Then install browser dependencies: ║
19
+ ║ ║
20
+ ║ playwright install chromium ║
21
+ ║ ║
22
+ ║ 🚀 After that, you can start testing: ║
23
+ ║ ║
24
+ ║ cursorflow test --base-url http://localhost:3000 --path / ║
25
+ ║ ║
26
+ ║ 📚 Documentation: https://github.com/yourrepo/cursorflow ║
27
+ ║ ║
28
+ ╚══════════════════════════════════════════════════════════════════════╝
29
+
@@ -93,10 +93,26 @@ All data structured for AI consumption:
93
93
 
94
94
  ## 🚀 Quick Start
95
95
 
96
+ ### Step 1: Install CursorFlow Package
96
97
  ```bash
97
- # Install CursorFlow
98
98
  pip install cursorflow
99
+ playwright install chromium
100
+ ```
99
101
 
102
+ ### Step 2: Initialize Your Project (One-Time Setup)
103
+ ```bash
104
+ cd /path/to/your/project
105
+ cursorflow install-rules
106
+ ```
107
+
108
+ This creates:
109
+ - `.cursor/rules/` - Cursor AI integration rules
110
+ - `cursorflow-config.json` - Project-specific configuration
111
+ - `.cursorflow/` - Artifacts and session storage
112
+ - `.gitignore` entries for CursorFlow artifacts
113
+
114
+ ### Step 3: Start Testing
115
+ ```bash
100
116
  # Test real application behavior
101
117
  cursorflow test --base-url http://localhost:3000 --path "/dashboard"
102
118
 
@@ -56,7 +56,7 @@ def _get_version():
56
56
  pass
57
57
 
58
58
  # Fallback version - should match pyproject.toml
59
- return "2.1.3"
59
+ return "2.1.5"
60
60
 
61
61
  __version__ = _get_version()
62
62
  __author__ = "GeekWarrior Development"
@@ -0,0 +1,147 @@
1
+ """
2
+ Auto-initialization for CursorFlow
3
+
4
+ Detects uninitialized projects and offers to set them up automatically.
5
+ Makes the setup process seamless for both humans and AI agents.
6
+ """
7
+
8
+ import os
9
+ import sys
10
+ from pathlib import Path
11
+ from typing import Optional
12
+
13
+
14
+ def is_project_initialized(project_dir: Optional[str] = None) -> bool:
15
+ """
16
+ Check if CursorFlow is initialized in the project
17
+
18
+ Returns True if:
19
+ - .cursor/rules/ contains CursorFlow rules
20
+ - cursorflow-config.json exists
21
+ - .cursorflow/ directory exists
22
+ """
23
+ if project_dir is None:
24
+ project_dir = os.getcwd()
25
+
26
+ project_path = Path(project_dir)
27
+
28
+ # Check for key indicators
29
+ has_rules = (project_path / ".cursor" / "rules" / "cursorflow-usage.mdc").exists()
30
+ has_config = (project_path / "cursorflow-config.json").exists()
31
+ has_artifacts_dir = (project_path / ".cursorflow").exists()
32
+
33
+ # Need at least rules and config
34
+ return has_rules and has_config
35
+
36
+
37
+ def auto_initialize_if_needed(project_dir: Optional[str] = None, interactive: bool = True) -> bool:
38
+ """
39
+ Auto-initialize CursorFlow in project if not already initialized
40
+
41
+ Args:
42
+ project_dir: Project directory (defaults to cwd)
43
+ interactive: If True, ask user for confirmation. If False, auto-initialize silently.
44
+
45
+ Returns:
46
+ True if initialized (or already was), False if user declined or error occurred
47
+ """
48
+ if is_project_initialized(project_dir):
49
+ return True
50
+
51
+ if project_dir is None:
52
+ project_dir = os.getcwd()
53
+
54
+ project_path = Path(project_dir)
55
+
56
+ # If non-interactive (e.g., running via Cursor), just do it
57
+ if not interactive:
58
+ try:
59
+ from .install_cursorflow_rules import install_cursorflow_rules
60
+ return install_cursorflow_rules(project_dir, force=False)
61
+ except Exception as e:
62
+ print(f"⚠️ Auto-initialization failed: {e}", file=sys.stderr)
63
+ print(f"💡 Run manually: cursorflow install-rules", file=sys.stderr)
64
+ return False
65
+
66
+ # Interactive mode: ask user
67
+ print("\n🎯 CursorFlow is not initialized in this project yet.")
68
+ print(f"📁 Project directory: {project_path}")
69
+ print("\nTo use CursorFlow, we need to set up:")
70
+ print(" • Cursor AI rules in .cursor/rules/")
71
+ print(" • Configuration file: cursorflow-config.json")
72
+ print(" • Artifacts directory: .cursorflow/")
73
+ print(" • .gitignore entries for CursorFlow artifacts")
74
+
75
+ response = input("\n🚀 Initialize CursorFlow now? [Y/n]: ").strip().lower()
76
+
77
+ if response in ('', 'y', 'yes'):
78
+ try:
79
+ from .install_cursorflow_rules import install_cursorflow_rules
80
+ success = install_cursorflow_rules(project_dir, force=False)
81
+
82
+ if success:
83
+ print("\n✅ CursorFlow is ready to use!")
84
+ print("💡 Start testing with: cursorflow test --help")
85
+
86
+ return success
87
+
88
+ except Exception as e:
89
+ print(f"\n❌ Initialization failed: {e}", file=sys.stderr)
90
+ print(f"💡 Try manually: cursorflow install-rules", file=sys.stderr)
91
+ return False
92
+ else:
93
+ print("\n⏭️ Skipped initialization.")
94
+ print("💡 Run later with: cursorflow install-rules")
95
+ return False
96
+
97
+
98
+ def get_initialization_warning() -> str:
99
+ """Get a friendly warning message for uninitialized projects"""
100
+
101
+ return """
102
+ ╔════════════════════════════════════════════════════════════════╗
103
+ ║ 🎯 CursorFlow Not Initialized ║
104
+ ╠════════════════════════════════════════════════════════════════╣
105
+ ║ ║
106
+ ║ CursorFlow requires project-specific setup to work properly. ║
107
+ ║ ║
108
+ ║ Quick fix: ║
109
+ ║ cursorflow install-rules ║
110
+ ║ ║
111
+ ║ This creates: ║
112
+ ║ • .cursor/rules/ (Cursor AI integration) ║
113
+ ║ • cursorflow-config.json (project configuration) ║
114
+ ║ • .cursorflow/ (artifacts and sessions) ║
115
+ ║ • .gitignore entries ║
116
+ ║ ║
117
+ ╚════════════════════════════════════════════════════════════════╝
118
+ """
119
+
120
+
121
+ def ensure_initialized(project_dir: Optional[str] = None, auto_init: bool = False) -> None:
122
+ """
123
+ Ensure project is initialized, or raise helpful error
124
+
125
+ Args:
126
+ project_dir: Project directory
127
+ auto_init: If True, automatically initialize without asking
128
+
129
+ Raises:
130
+ RuntimeError: If not initialized and user declines/can't initialize
131
+ """
132
+ if is_project_initialized(project_dir):
133
+ return
134
+
135
+ # Try auto-initialization
136
+ interactive = not auto_init and sys.stdin.isatty()
137
+
138
+ if auto_initialize_if_needed(project_dir, interactive=interactive):
139
+ return
140
+
141
+ # Failed to initialize
142
+ print(get_initialization_warning(), file=sys.stderr)
143
+ raise RuntimeError(
144
+ "CursorFlow not initialized in this project. "
145
+ "Run: cursorflow install-rules"
146
+ )
147
+
@@ -22,9 +22,31 @@ console = Console()
22
22
 
23
23
  @click.group()
24
24
  @click.version_option(version=__version__)
25
- def main():
25
+ @click.pass_context
26
+ def main(ctx):
26
27
  """Universal UI testing framework for any web technology"""
27
- pass
28
+
29
+ # Skip initialization check for commands that don't need it
30
+ skip_init_check = ['install-rules', 'init', 'update', 'check-updates', 'install-deps']
31
+
32
+ if ctx.invoked_subcommand in skip_init_check:
33
+ return
34
+
35
+ # Check if project is initialized, offer to auto-initialize
36
+ from .auto_init import is_project_initialized, auto_initialize_if_needed
37
+
38
+ if not is_project_initialized():
39
+ console.print("\n[yellow]⚠️ CursorFlow not initialized in this project[/yellow]")
40
+ console.print("This is a one-time setup that creates:")
41
+ console.print(" • .cursor/rules/ (Cursor AI integration)")
42
+ console.print(" • cursorflow-config.json (project configuration)")
43
+ console.print(" • .cursorflow/ (artifacts directory)")
44
+
45
+ # Auto-initialize with confirmation
46
+ if not auto_initialize_if_needed(interactive=True):
47
+ console.print("\n[red]Cannot proceed without initialization.[/red]")
48
+ console.print("Run: [cyan]cursorflow install-rules[/cyan]")
49
+ ctx.exit(1)
28
50
 
29
51
  @main.command()
30
52
  @click.option('--base-url', '-u', required=True,
@@ -125,9 +125,9 @@ def create_config_template(project_path: Path, force: bool = False):
125
125
  # Get current version
126
126
  try:
127
127
  import cursorflow
128
- current_version = getattr(cursorflow, '__version__', '2.1.3')
128
+ current_version = getattr(cursorflow, '__version__', '2.1.5')
129
129
  except ImportError:
130
- current_version = '2.1.3'
130
+ current_version = '2.1.5'
131
131
 
132
132
  if config_path.exists():
133
133
  if not force:
@@ -302,9 +302,9 @@ def setup_update_checking(project_path: Path):
302
302
  # Create initial version tracking
303
303
  try:
304
304
  import cursorflow
305
- current_version = getattr(cursorflow, '__version__', '2.1.3')
305
+ current_version = getattr(cursorflow, '__version__', '2.1.5')
306
306
  except ImportError:
307
- current_version = '2.1.3'
307
+ current_version = '2.1.5'
308
308
 
309
309
  version_info = {
310
310
  "installed_version": current_version,
@@ -30,7 +30,13 @@ class LocalFileLogSource:
30
30
  'next_server': '.next/trace.log'
31
31
  }
32
32
  """
33
- self.log_paths = log_paths
33
+ # Handle case where log_paths is a string instead of dict
34
+ if isinstance(log_paths, str):
35
+ self.log_paths = {"default": log_paths}
36
+ elif isinstance(log_paths, list):
37
+ self.log_paths = {f"log_{i}": path for i, path in enumerate(log_paths)}
38
+ else:
39
+ self.log_paths = log_paths
34
40
  self.log_queue = queue.Queue()
35
41
  self.tail_processes = {}
36
42
  self.monitoring = False
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Post-install message for CursorFlow
4
+
5
+ Shows important setup instructions after pip install.
6
+ """
7
+
8
+ def show_post_install_message():
9
+ """Display post-install instructions"""
10
+
11
+ message = """
12
+ ╔══════════════════════════════════════════════════════════════════════╗
13
+ ║ ║
14
+ ║ ✅ CursorFlow installed successfully! ║
15
+ ║ ║
16
+ ║ 📋 IMPORTANT: One more step to enable CursorFlow in your project ║
17
+ ║ ║
18
+ ║ Run this in your project directory: ║
19
+ ║ ║
20
+ ║ cd /path/to/your/project ║
21
+ ║ cursorflow install-rules ║
22
+ ║ ║
23
+ ║ This creates: ║
24
+ ║ • Cursor AI integration rules ║
25
+ ║ • Project-specific configuration ║
26
+ ║ • Artifacts directory structure ║
27
+ ║ ║
28
+ ║ 💡 Then install browser dependencies: ║
29
+ ║ ║
30
+ ║ playwright install chromium ║
31
+ ║ ║
32
+ ║ 🚀 After that, you can start testing: ║
33
+ ║ ║
34
+ ║ cursorflow test --base-url http://localhost:3000 --path / ║
35
+ ║ ║
36
+ ║ 📚 Documentation: https://github.com/haley-marketing-group/cursorflow ║
37
+ ║ ║
38
+ ╚══════════════════════════════════════════════════════════════════════╝
39
+ """
40
+
41
+ print(message)
42
+
43
+
44
+ if __name__ == "__main__":
45
+ show_post_install_message()
46
+
@@ -1,11 +1,32 @@
1
1
  ---
2
- title: CursorFlow 2.0.0 Installation & Setup Guide for Cursor
3
- description: How to install and configure CursorFlow 2.0.0 for complete page intelligence in AI-driven development
2
+ title: CursorFlow Installation & Setup Guide for Cursor
3
+ description: How to install and configure CursorFlow for complete page intelligence in AI-driven development
4
4
  ---
5
5
 
6
- # CursorFlow 2.0.0 Installation & Setup Guide for Cursor
6
+ # CursorFlow Installation & Setup Guide for Cursor
7
7
 
8
- ## 🚀 **When to Install CursorFlow 2.0.0**
8
+ ## ⚠️ **CRITICAL: Two-Step Installation Process**
9
+
10
+ **If you are reading this file, Step 2 is already complete for this project.**
11
+
12
+ CursorFlow requires **TWO installations**:
13
+
14
+ 1. **Step 1 - Package Installation** (once per Python environment):
15
+ ```bash
16
+ pip install cursorflow
17
+ playwright install chromium
18
+ ```
19
+
20
+ 2. **Step 2 - Project Initialization** (once per project):
21
+ ```bash
22
+ cursorflow install-rules
23
+ ```
24
+ This step created THIS FILE you're reading right now.
25
+
26
+ **If Cursor reports "command not found: cursorflow"**, the user needs Step 1.
27
+ **If you can run cursorflow but tests fail**, check `cursorflow-config.json` in project root.
28
+
29
+ ## 🚀 **When to Install CursorFlow**
9
30
 
10
31
  ### **Automatically Install When:**
11
32
  - User mentions UI testing, visual debugging, or layout issues
@@ -24,10 +45,13 @@ description: How to install and configure CursorFlow 2.0.0 for complete page int
24
45
 
25
46
  ## 📦 **Installation Steps**
26
47
 
27
- ### **1. Install CursorFlow 2.0.0:**
48
+ ### **1. Verify Package Installation:**
28
49
  ```bash
29
- # Install CursorFlow 2.0.0 with complete page intelligence
30
- pip install cursorflow
50
+ # Check if CursorFlow is installed
51
+ cursorflow --version
52
+
53
+ # If not installed or outdated:
54
+ pip install --upgrade cursorflow
31
55
 
32
56
  # Install browser automation dependencies
33
57
  playwright install chromium
@@ -1,6 +1,6 @@
1
1
  # CursorFlow Usage Rules for Cursor AI
2
2
 
3
- ## 🔥 **CursorFlow 2.0.0: Complete Page Intelligence for AI-Driven Development**
3
+ ## 🔥 **CursorFlow 2.1.4: Complete Page Intelligence for AI-Driven Development**
4
4
 
5
5
  **CursorFlow provides comprehensive data collection for rapid UI iteration:**
6
6
 
@@ -9,6 +9,8 @@
9
9
  - 📊 **Comprehensive Page Analysis** - Fonts, animations, resources, storage state
10
10
  - 🎯 **Enhanced Error Context Collection** - Smart screenshot deduplication
11
11
  - ⚡ **Enhanced Browser Data Capture** - Playwright traces + network interception
12
+ - 📱 **Parallel Viewport Testing** - Mobile, tablet, desktop responsive testing
13
+ - 🖼️ **Enhanced Screenshot Options** - Clipping, masking, quality control
12
14
 
13
15
  ## When to Use CursorFlow
14
16
 
@@ -217,7 +219,7 @@ print(f"Performance metrics: {screenshot_data['performance_data']}")
217
219
  # Playwright trace available at: .cursorflow/artifacts/traces/session.zip
218
220
  ```
219
221
 
220
- ## 🚀 **CursorFlow CLI Usage (v2.0.0)**
222
+ ## 🚀 **CursorFlow CLI Usage (v2.1.4)**
221
223
 
222
224
  ### **Basic Testing:**
223
225
  ```bash
@@ -233,12 +235,33 @@ cursorflow test \
233
235
  {"screenshot": "state"}
234
236
  ]'
235
237
 
238
+ # 🆕 Parallel responsive testing (mobile, tablet, desktop)
239
+ cursorflow test --base-url http://localhost:3000 --path "/dashboard" --responsive
240
+
241
+ # 🆕 Enhanced screenshot options
242
+ cursorflow test \
243
+ --base-url http://localhost:3000 \
244
+ --actions '[
245
+ {"navigate": "/page"},
246
+ {"screenshot": {
247
+ "name": "clipped-header",
248
+ "options": {
249
+ "clip": {"selector": "#header"},
250
+ "mask": [".user-email", ".sensitive-data"],
251
+ "full_page": false,
252
+ "quality": 90
253
+ }
254
+ }}
255
+ ]'
256
+
236
257
  # Results include:
237
258
  # - Hot Reload Intelligence status
238
259
  # - Advanced Element Intelligence (7 selector types)
239
260
  # - Comprehensive Page Analysis (fonts, animations, resources)
240
261
  # - Enhanced Error Context (smart deduplication)
241
262
  # - Enhanced Browser Data (Playwright traces)
263
+ # - 🆕 Parallel Viewport Analysis (responsive testing)
264
+ # - 🆕 Enhanced Screenshot Metadata (options used)
242
265
  ```
243
266
 
244
267
  ### **Available CLI Commands:**
@@ -260,7 +283,10 @@ cursorflow --help # Show all commands and options
260
283
  | `fill` | `{"fill": {"selector": "#input", "value": "text"}}` | Fill form field |
261
284
  | `wait` | `{"wait": 2}` | Wait seconds |
262
285
  | `wait_for` | `{"wait_for": "#element"}` | Wait for element |
263
- | `screenshot` | `{"screenshot": "name"}` | Take screenshot |
286
+ | `screenshot` | `{"screenshot": "name"}` | Take basic screenshot |
287
+ | 🆕 `screenshot` | `{"screenshot": {"name": "test", "options": {"clip": {"selector": "#header"}}}}` | Enhanced screenshot with clipping |
288
+ | 🆕 `screenshot` | `{"screenshot": {"name": "test", "options": {"mask": [".sensitive"]}}}` | Screenshot with masked elements |
289
+ | 🆕 `screenshot` | `{"screenshot": {"name": "test.jpg", "options": {"quality": 90}}}` | JPEG screenshot with quality |
264
290
 
265
291
  ## Common Usage Patterns
266
292
 
@@ -279,6 +305,48 @@ cursorflow test \
279
305
  ]'
280
306
  ```
281
307
 
308
+ ### 🆕 Responsive Testing (Parallel Viewports)
309
+ ```bash
310
+ # Simple responsive test across mobile, tablet, desktop
311
+ cursorflow test --base-url http://localhost:3000 --path "/dashboard" --responsive
312
+
313
+ # Custom responsive test with actions
314
+ cursorflow test --base-url http://localhost:3000 --responsive --actions '[
315
+ {"navigate": "/dashboard"},
316
+ {"wait_for": "#main-content"},
317
+ {"screenshot": "responsive-dashboard"},
318
+ {"click": "#menu-toggle"},
319
+ {"screenshot": "responsive-menu"}
320
+ ]'
321
+
322
+ # Results include:
323
+ # - Performance comparison across viewports
324
+ # - Layout differences analysis
325
+ # - Responsive behavior insights
326
+ # - Cross-viewport screenshots
327
+ ```
328
+
329
+ ### 🆕 Enhanced Screenshot Options
330
+ ```bash
331
+ # Component-focused screenshots
332
+ cursorflow test --base-url http://localhost:3000 --actions '[
333
+ {"navigate": "/page"},
334
+ {"screenshot": {"name": "header", "options": {"clip": {"selector": "#header"}}}}
335
+ ]'
336
+
337
+ # Privacy-aware screenshots (mask sensitive data)
338
+ cursorflow test --base-url http://localhost:3000 --actions '[
339
+ {"navigate": "/profile"},
340
+ {"screenshot": {"name": "profile", "options": {"mask": [".user-email", ".api-key"]}}}
341
+ ]'
342
+
343
+ # High-quality JPEG screenshots
344
+ cursorflow test --base-url http://localhost:3000 --actions '[
345
+ {"navigate": "/page"},
346
+ {"screenshot": {"name": "page.jpg", "options": {"quality": 95, "full_page": true}}}
347
+ ]'
348
+ ```
349
+
282
350
  ### Login Flow Testing
283
351
  ```bash
284
352
  cursorflow test \
@@ -1,12 +1,16 @@
1
+ FIRST_TIME_SETUP.md
1
2
  LICENSE
2
3
  MANIFEST.in
4
+ POST_INSTALL_MESSAGE.txt
3
5
  README.md
4
6
  pyproject.toml
5
7
  setup.py
6
8
  cursorflow/__init__.py
9
+ cursorflow/auto_init.py
7
10
  cursorflow/auto_updater.py
8
11
  cursorflow/cli.py
9
12
  cursorflow/install_cursorflow_rules.py
13
+ cursorflow/post_install.py
10
14
  cursorflow/updater.py
11
15
  cursorflow/core/agent.py
12
16
  cursorflow/core/auth_handler.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cursorflow"
7
- version = "2.1.3"
7
+ version = "2.1.5"
8
8
  description = "🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis"
9
9
  authors = [
10
10
  {name = "GeekWarrior Development", email = "rbush@cooltheory.com"}
@@ -63,6 +63,9 @@ Repository = "https://github.com/haley-marketing-group/cursorflow"
63
63
  where = ["."]
64
64
  include = ["cursorflow*"]
65
65
 
66
+ [tool.setuptools.package-data]
67
+ cursorflow = ["rules/*.mdc", "rules/*.md"]
68
+
66
69
 
67
70
  [tool.black]
68
71
  line-length = 88
File without changes
File without changes
File without changes