cursorflow 2.1.4__tar.gz → 2.1.6__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.6/FIRST_TIME_SETUP.md +215 -0
  2. {cursorflow-2.1.4 → cursorflow-2.1.6}/MANIFEST.in +2 -0
  3. {cursorflow-2.1.4 → cursorflow-2.1.6}/PKG-INFO +21 -2
  4. cursorflow-2.1.6/POST_INSTALL_MESSAGE.txt +29 -0
  5. {cursorflow-2.1.4 → cursorflow-2.1.6}/README.md +20 -1
  6. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/__init__.py +1 -1
  7. cursorflow-2.1.6/cursorflow/auto_init.py +151 -0
  8. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/cli.py +34 -5
  9. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/install_cursorflow_rules.py +14 -11
  10. cursorflow-2.1.6/cursorflow/post_install.py +46 -0
  11. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/rules/cursorflow-installation.mdc +31 -7
  12. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/updater.py +4 -3
  13. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow.egg-info/SOURCES.txt +4 -0
  14. {cursorflow-2.1.4 → cursorflow-2.1.6}/pyproject.toml +4 -1
  15. {cursorflow-2.1.4 → cursorflow-2.1.6}/LICENSE +0 -0
  16. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/auto_updater.py +0 -0
  17. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/agent.py +0 -0
  18. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/auth_handler.py +0 -0
  19. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/browser_controller.py +0 -0
  20. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/browser_engine.py +0 -0
  21. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/css_iterator.py +0 -0
  22. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/cursor_integration.py +0 -0
  23. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/cursorflow.py +0 -0
  24. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/error_context_collector.py +0 -0
  25. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/error_correlator.py +0 -0
  26. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/event_correlator.py +0 -0
  27. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/file_change_monitor.py +0 -0
  28. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/hmr_detector.py +0 -0
  29. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/log_collector.py +0 -0
  30. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/log_monitor.py +0 -0
  31. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/mockup_comparator.py +0 -0
  32. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/persistent_session.py +0 -0
  33. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/report_generator.py +0 -0
  34. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/core/trace_manager.py +0 -0
  35. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/log_sources/local_file.py +0 -0
  36. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/log_sources/ssh_remote.py +0 -0
  37. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/rules/__init__.py +0 -0
  38. {cursorflow-2.1.4 → cursorflow-2.1.6}/cursorflow/rules/cursorflow-usage.mdc +0 -0
  39. {cursorflow-2.1.4 → cursorflow-2.1.6}/docs/USER_MANUAL.md +0 -0
  40. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/comprehensive_screenshot_example.py +0 -0
  41. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/enhanced_screenshot_example.py +0 -0
  42. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/mockup_comparison_example.py +0 -0
  43. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/opensas_example.py +0 -0
  44. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/react_example.py +0 -0
  45. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/responsive_testing_example.py +0 -0
  46. {cursorflow-2.1.4 → cursorflow-2.1.6}/examples/v2_comprehensive_demo.py +0 -0
  47. {cursorflow-2.1.4 → cursorflow-2.1.6}/setup.cfg +0 -0
  48. {cursorflow-2.1.4 → cursorflow-2.1.6}/setup.py +0 -0
@@ -0,0 +1,215 @@
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
+ # Or for automation/CI (skip prompts)
28
+ cursorflow install-rules --yes
29
+ ```
30
+
31
+ **What this creates:**
32
+ - `.cursor/rules/` - Cursor AI integration rules (tells Cursor how to use CursorFlow)
33
+ - `.cursorflow/config.json` - Project-specific settings (base URL, log paths, etc.)
34
+ - `.cursorflow/` - Artifacts directory (screenshots, sessions, test results)
35
+ - `.gitignore` entries - Excludes entire `.cursorflow/` directory from version control
36
+
37
+ ## 🤔 Why Two Steps?
38
+
39
+ **Think of it like Git:**
40
+ - `pip install cursorflow` = Installing the git CLI globally
41
+ - `cursorflow install-rules` = Running `git init` in each project
42
+
43
+ Each project needs its own CursorFlow configuration because:
44
+ - Different base URLs (localhost:3000 vs localhost:8000)
45
+ - Different log paths (Django logs vs React logs)
46
+ - Different authentication setups
47
+ - Different Cursor AI rules location per project
48
+
49
+ ## 🚀 Auto-Initialization
50
+
51
+ If you forget step 2, CursorFlow will detect it and offer to initialize automatically:
52
+
53
+ ```bash
54
+ $ cursorflow test --base-url http://localhost:3000
55
+
56
+ ⚠️ CursorFlow not initialized in this project
57
+ This is a one-time setup that creates:
58
+ • .cursor/rules/ (Cursor AI integration)
59
+ • cursorflow-config.json (project configuration)
60
+ • .cursorflow/ (artifacts directory)
61
+
62
+ 🚀 Initialize CursorFlow now? [Y/n]: y
63
+
64
+ ✅ CursorFlow is ready to use!
65
+ ```
66
+
67
+ ## 📋 What Happens During Project Initialization?
68
+
69
+ ### 1. Cursor AI Integration (`.cursor/rules/`)
70
+ Copies usage rules that teach Cursor AI how to use CursorFlow:
71
+ - `cursorflow-usage.mdc` - How to run tests and analyze results
72
+ - `cursorflow-installation.mdc` - Installation and setup guidance
73
+
74
+ ### 2. Configuration File (`.cursorflow/config.json`)
75
+ Auto-detects your project type and creates smart defaults:
76
+
77
+ ```json
78
+ {
79
+ "base_url": "http://localhost:3000",
80
+ "logs": {
81
+ "source": "local",
82
+ "paths": ["logs/app.log"]
83
+ },
84
+ "auth": {
85
+ "method": "form",
86
+ "username_selector": "#username",
87
+ "password_selector": "#password",
88
+ "submit_selector": "#login-button",
89
+ "session_storage": ".cursorflow/sessions/"
90
+ },
91
+ "browser": {
92
+ "headless": true,
93
+ "debug_mode": false
94
+ },
95
+ "_project_type": "react",
96
+ "_cursorflow_version": "2.1.5"
97
+ }
98
+ ```
99
+
100
+ ### 3. Project Structure
101
+ ```
102
+ your-project/
103
+ ├── .cursor/
104
+ │ └── rules/
105
+ │ ├── cursorflow-usage.mdc
106
+ │ └── cursorflow-installation.mdc
107
+ ├── .cursorflow/
108
+ │ ├── config.json
109
+ │ ├── artifacts/
110
+ │ ├── sessions/
111
+ │ └── version_info.json
112
+ └── .gitignore (updated with CursorFlow entries)
113
+ ```
114
+
115
+ ## 🎪 Common Scenarios
116
+
117
+ ### New Team Member Setup
118
+ ```bash
119
+ # They need both steps:
120
+ pip install cursorflow
121
+ playwright install chromium
122
+ cd /path/to/existing/project
123
+ # No need to run install-rules - config already exists!
124
+ ```
125
+
126
+ ### New Project
127
+ ```bash
128
+ # Full setup:
129
+ pip install cursorflow
130
+ playwright install chromium
131
+ cd /path/to/new/project
132
+ cursorflow install-rules
133
+ ```
134
+
135
+ ### Multiple Projects
136
+ ```bash
137
+ # Install once globally:
138
+ pip install cursorflow
139
+ playwright install chromium
140
+
141
+ # Initialize each project:
142
+ cd ~/projects/project-a && cursorflow install-rules
143
+ cd ~/projects/project-b && cursorflow install-rules
144
+ cd ~/projects/project-c && cursorflow install-rules
145
+ ```
146
+
147
+ ## 🔍 Verifying Setup
148
+
149
+ ### Check Package Installation
150
+ ```bash
151
+ cursorflow --version
152
+ # Should output: cursorflow, version 2.1.5
153
+ ```
154
+
155
+ ### Check Project Initialization
156
+ ```bash
157
+ # From project directory:
158
+ ls -la .cursor/rules/
159
+ # Should show: cursorflow-usage.mdc, cursorflow-installation.mdc
160
+
161
+ ls -la .cursorflow/config.json
162
+ # Should exist
163
+
164
+ ls -la .cursorflow/
165
+ # Should exist
166
+ ```
167
+
168
+ ## 🚨 Troubleshooting
169
+
170
+ ### "Command not found: cursorflow"
171
+ **Problem:** Package not installed
172
+ **Solution:** `pip install cursorflow`
173
+
174
+ ### "CursorFlow not initialized in this project"
175
+ **Problem:** Project not initialized
176
+ **Solution:** `cursorflow install-rules`
177
+
178
+ ### "Cursor doesn't know about CursorFlow"
179
+ **Problem:** Rules not installed in project
180
+ **Solution:** `cursorflow install-rules` (creates `.cursor/rules/`)
181
+
182
+ ### "pip install worked but CursorFlow doesn't work"
183
+ **Problem:** Missing step 2
184
+ **Solution:** Run `cursorflow install-rules` in your project
185
+
186
+ ## 💡 Pro Tips
187
+
188
+ 1. **Add to your project README:**
189
+ ```markdown
190
+ ## Development Setup
191
+ ```bash
192
+ pip install -r requirements.txt
193
+ cursorflow install-rules # One-time CursorFlow setup
194
+ npm install
195
+ ```
196
+ ```
197
+
198
+ 2. **Add to onboarding checklist:**
199
+ - [ ] Clone repository
200
+ - [ ] Install dependencies
201
+ - [ ] **Run `cursorflow install-rules`** ← Don't forget!
202
+ - [ ] Run tests
203
+
204
+ 3. **Version control:**
205
+ - ❌ Don't commit `.cursorflow/` (config, artifacts, all per-developer)
206
+ - ✅ Commit `.cursor/rules/` (Cursor AI integration)
207
+ - 💡 Each dev runs `cursorflow install-rules` to create their own config
208
+
209
+ ## 🎯 Remember
210
+
211
+ **Package Installation = Global tool**
212
+ **Project Initialization = Per-project setup**
213
+
214
+ Just like `npm install -g typescript` vs `tsc --init`! 🚀
215
+
@@ -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.4
3
+ Version: 2.1.6
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,29 @@ 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
+ ```
146
+
147
+ ### Step 2: Initialize Your Project (One-Time Setup)
148
+ ```bash
149
+ cd /path/to/your/project
150
+ cursorflow install-rules
144
151
 
152
+ # Or skip prompts for automation/CI
153
+ cursorflow install-rules --yes
154
+ ```
155
+
156
+ This creates:
157
+ - `.cursor/rules/` - Cursor AI integration rules
158
+ - `.cursorflow/config.json` - Project-specific configuration
159
+ - `.cursorflow/` - Artifacts and session storage
160
+ - `.gitignore` entries for CursorFlow artifacts
161
+
162
+ ### Step 3: Start Testing
163
+ ```bash
145
164
  # Test real application behavior
146
165
  cursorflow test --base-url http://localhost:3000 --path "/dashboard"
147
166
 
@@ -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,29 @@ 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
+ ```
101
+
102
+ ### Step 2: Initialize Your Project (One-Time Setup)
103
+ ```bash
104
+ cd /path/to/your/project
105
+ cursorflow install-rules
99
106
 
107
+ # Or skip prompts for automation/CI
108
+ cursorflow install-rules --yes
109
+ ```
110
+
111
+ This creates:
112
+ - `.cursor/rules/` - Cursor AI integration rules
113
+ - `.cursorflow/config.json` - Project-specific configuration
114
+ - `.cursorflow/` - Artifacts and session storage
115
+ - `.gitignore` entries for CursorFlow artifacts
116
+
117
+ ### Step 3: Start Testing
118
+ ```bash
100
119
  # Test real application behavior
101
120
  cursorflow test --base-url http://localhost:3000 --path "/dashboard"
102
121
 
@@ -56,7 +56,7 @@ def _get_version():
56
56
  pass
57
57
 
58
58
  # Fallback version - should match pyproject.toml
59
- return "2.1.4"
59
+ return "2.1.6"
60
60
 
61
61
  __version__ = _get_version()
62
62
  __author__ = "GeekWarrior Development"
@@ -0,0 +1,151 @@
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
+
32
+ # Need at least rules and config
33
+ return has_rules and has_config
34
+
35
+
36
+ def auto_initialize_if_needed(project_dir: Optional[str] = None, interactive: bool = True) -> bool:
37
+ """
38
+ Auto-initialize CursorFlow in project if not already initialized
39
+
40
+ Args:
41
+ project_dir: Project directory (defaults to cwd)
42
+ interactive: If True, ask user for confirmation. If False, auto-initialize silently.
43
+
44
+ Returns:
45
+ True if initialized (or already was), False if user declined or error occurred
46
+ """
47
+ if is_project_initialized(project_dir):
48
+ return True
49
+
50
+ if project_dir is None:
51
+ project_dir = os.getcwd()
52
+
53
+ project_path = Path(project_dir)
54
+
55
+ # If non-interactive (e.g., running via Cursor), just do it
56
+ if not interactive:
57
+ try:
58
+ from .install_cursorflow_rules import install_cursorflow_rules
59
+ return install_cursorflow_rules(project_dir, force=False)
60
+ except Exception as e:
61
+ print(f"⚠️ Auto-initialization failed: {e}", file=sys.stderr)
62
+ print(f"💡 Run manually: cursorflow install-rules", file=sys.stderr)
63
+ return False
64
+
65
+ # Interactive mode: ask user
66
+ if not sys.stdin.isatty():
67
+ # Non-interactive environment (CI, pipes, etc) - auto-accept
68
+ print("🎯 CursorFlow not initialized. Auto-initializing (non-interactive mode)...")
69
+ response = 'y'
70
+ else:
71
+ print("\n🎯 CursorFlow is not initialized in this project yet.")
72
+ print(f"📁 Project directory: {project_path}")
73
+ print("\nTo use CursorFlow, we need to set up:")
74
+ print(" • Cursor AI rules in .cursor/rules/")
75
+ print(" • Configuration file: .cursorflow/config.json")
76
+ print(" • Artifacts directory: .cursorflow/")
77
+ print(" • .gitignore entries for CursorFlow artifacts")
78
+
79
+ response = input("\n🚀 Initialize CursorFlow now? [Y/n]: ").strip().lower()
80
+
81
+ if response in ('', 'y', 'yes'):
82
+ try:
83
+ from .install_cursorflow_rules import install_cursorflow_rules
84
+ success = install_cursorflow_rules(project_dir, force=False)
85
+
86
+ if success:
87
+ print("\n✅ CursorFlow is ready to use!")
88
+ print("💡 Start testing with: cursorflow test --help")
89
+
90
+ return success
91
+
92
+ except Exception as e:
93
+ print(f"\n❌ Initialization failed: {e}", file=sys.stderr)
94
+ print(f"💡 Try manually: cursorflow install-rules", file=sys.stderr)
95
+ return False
96
+ else:
97
+ print("\n⏭️ Skipped initialization.")
98
+ print("💡 Run later with: cursorflow install-rules")
99
+ return False
100
+
101
+
102
+ def get_initialization_warning() -> str:
103
+ """Get a friendly warning message for uninitialized projects"""
104
+
105
+ return """
106
+ ╔════════════════════════════════════════════════════════════════╗
107
+ ║ 🎯 CursorFlow Not Initialized ║
108
+ ╠════════════════════════════════════════════════════════════════╣
109
+ ║ ║
110
+ ║ CursorFlow requires project-specific setup to work properly. ║
111
+ ║ ║
112
+ ║ Quick fix: ║
113
+ ║ cursorflow install-rules ║
114
+ ║ ║
115
+ ║ This creates: ║
116
+ ║ • .cursor/rules/ (Cursor AI integration) ║
117
+ ║ • .cursorflow/config.json (project configuration) ║
118
+ ║ • .cursorflow/ (artifacts and sessions) ║
119
+ ║ • .gitignore entries ║
120
+ ║ ║
121
+ ╚════════════════════════════════════════════════════════════════╝
122
+ """
123
+
124
+
125
+ def ensure_initialized(project_dir: Optional[str] = None, auto_init: bool = False) -> None:
126
+ """
127
+ Ensure project is initialized, or raise helpful error
128
+
129
+ Args:
130
+ project_dir: Project directory
131
+ auto_init: If True, automatically initialize without asking
132
+
133
+ Raises:
134
+ RuntimeError: If not initialized and user declines/can't initialize
135
+ """
136
+ if is_project_initialized(project_dir):
137
+ return
138
+
139
+ # Try auto-initialization
140
+ interactive = not auto_init and sys.stdin.isatty()
141
+
142
+ if auto_initialize_if_needed(project_dir, interactive=interactive):
143
+ return
144
+
145
+ # Failed to initialize
146
+ print(get_initialization_warning(), file=sys.stderr)
147
+ raise RuntimeError(
148
+ "CursorFlow not initialized in this project. "
149
+ "Run: cursorflow install-rules"
150
+ )
151
+
@@ -22,9 +22,36 @@ 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
+ # Check if running in non-interactive mode (CI, scripts, etc)
40
+ import sys
41
+ is_interactive = sys.stdin.isatty()
42
+
43
+ if is_interactive:
44
+ console.print("\n[yellow]⚠️ CursorFlow not initialized in this project[/yellow]")
45
+ console.print("This is a one-time setup that creates:")
46
+ console.print(" • .cursor/rules/ (Cursor AI integration)")
47
+ console.print(" • .cursorflow/config.json (project configuration)")
48
+ console.print(" • .cursorflow/ (artifacts directory)")
49
+
50
+ # Auto-initialize with confirmation (or silently if non-interactive)
51
+ if not auto_initialize_if_needed(interactive=is_interactive):
52
+ console.print("\n[red]Cannot proceed without initialization.[/red]")
53
+ console.print("Run: [cyan]cursorflow install-rules --yes[/cyan]")
54
+ ctx.exit(1)
28
55
 
29
56
  @main.command()
30
57
  @click.option('--base-url', '-u', required=True,
@@ -452,10 +479,12 @@ async def _run_auto_tests(framework: str, base_url: str, config: Dict):
452
479
  @click.argument('project_path', default='.')
453
480
  @click.option('--framework', '-f')
454
481
  @click.option('--force', is_flag=True, help='Force update existing configuration')
455
- def install_rules(project_path, framework, force):
482
+ @click.option('--yes', '-y', is_flag=True, help='Skip confirmation prompts')
483
+ def install_rules(project_path, framework, force, yes):
456
484
  """Install CursorFlow rules and configuration in a project"""
457
485
 
458
- console.print("🚀 Installing CursorFlow rules and configuration...")
486
+ if not yes:
487
+ console.print("🚀 Installing CursorFlow rules and configuration...")
459
488
 
460
489
  try:
461
490
  # Import and run the installation
@@ -465,7 +494,7 @@ def install_rules(project_path, framework, force):
465
494
  if success:
466
495
  console.print("[green]✅ CursorFlow rules installed successfully![/green]")
467
496
  console.print("\nNext steps:")
468
- console.print("1. Review cursorflow-config.json")
497
+ console.print("1. Review .cursorflow/config.json")
469
498
  console.print("2. Install dependencies: pip install cursorflow && playwright install chromium")
470
499
  console.print("3. Start testing: Use CursorFlow in Cursor!")
471
500
  else:
@@ -80,10 +80,9 @@ def install_cursorflow_rules(project_dir: str = ".", force: bool = False):
80
80
  setup_update_checking(project_path)
81
81
 
82
82
  print(f"\n📝 Next steps:")
83
- print(f" 1. Review cursorflow-config.json and update for your project")
84
- print(f" 2. Install CursorFlow: pip install cursorflow")
85
- print(f" 3. Install Playwright: playwright install chromium")
86
- print(f" 4. Start using CursorFlow for UI testing and CSS iteration!")
83
+ print(f" 1. Review .cursorflow/config.json and update for your project")
84
+ print(f" 2. Install Playwright: playwright install chromium")
85
+ print(f" 3. Start using CursorFlow for UI testing and CSS iteration!")
87
86
  print(f"\n🔄 Update commands:")
88
87
  print(f" - Check for updates: python -m cursorflow check-updates")
89
88
  print(f" - Update CursorFlow: python -m cursorflow update")
@@ -120,18 +119,22 @@ cursorflow_session_*.json
120
119
  def create_config_template(project_path: Path, force: bool = False):
121
120
  """Create or update CursorFlow configuration template"""
122
121
 
123
- config_path = project_path / "cursorflow-config.json"
122
+ # Create .cursorflow directory if it doesn't exist
123
+ cursorflow_dir = project_path / ".cursorflow"
124
+ cursorflow_dir.mkdir(exist_ok=True)
125
+
126
+ config_path = cursorflow_dir / "config.json"
124
127
 
125
128
  # Get current version
126
129
  try:
127
130
  import cursorflow
128
- current_version = getattr(cursorflow, '__version__', '2.1.4')
131
+ current_version = getattr(cursorflow, '__version__', '2.1.6')
129
132
  except ImportError:
130
- current_version = '2.1.4'
133
+ current_version = '2.1.6'
131
134
 
132
135
  if config_path.exists():
133
136
  if not force:
134
- print("ℹ️ cursorflow-config.json already exists (use --force to recreate)")
137
+ print("ℹ️ .cursorflow/config.json already exists (use --force to recreate)")
135
138
  # Smart update: only update version and add missing fields
136
139
  try:
137
140
  with open(config_path) as f:
@@ -198,7 +201,7 @@ def create_config_template(project_path: Path, force: bool = False):
198
201
  json.dump(config_template, f, indent=2)
199
202
 
200
203
  action = "Recreated" if force else "Created"
201
- print(f"✅ {action} configuration template: cursorflow-config.json")
204
+ print(f"✅ {action} configuration: .cursorflow/config.json")
202
205
  print(f" Detected project type: {project_type}")
203
206
  print(f" CursorFlow version: {current_version}")
204
207
 
@@ -302,9 +305,9 @@ def setup_update_checking(project_path: Path):
302
305
  # Create initial version tracking
303
306
  try:
304
307
  import cursorflow
305
- current_version = getattr(cursorflow, '__version__', '2.1.4')
308
+ current_version = getattr(cursorflow, '__version__', '2.1.6')
306
309
  except ImportError:
307
- current_version = '2.1.4'
310
+ current_version = '2.1.6'
308
311
 
309
312
  version_info = {
310
313
  "installed_version": current_version,
@@ -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.1.4 Installation & Setup Guide for Cursor
6
+ # CursorFlow Installation & Setup Guide for Cursor
7
7
 
8
- ## 🚀 **When to Install CursorFlow 2.1.4**
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` configuration.
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
@@ -363,7 +363,7 @@ class CursorFlowUpdater:
363
363
 
364
364
  async def _migrate_configuration(self) -> bool:
365
365
  """Migrate configuration to new format if needed"""
366
- config_file = self.project_dir / "cursorflow-config.json"
366
+ config_file = self.project_dir / ".cursorflow" / "config.json"
367
367
 
368
368
  if not config_file.exists():
369
369
  return True
@@ -417,9 +417,10 @@ class CursorFlowUpdater:
417
417
  backup_path = backup_dir / backup_name
418
418
 
419
419
  # Backup configuration and rules
420
- if (self.project_dir / "cursorflow-config.json").exists():
420
+ config_file = self.project_dir / ".cursorflow" / "config.json"
421
+ if config_file.exists():
421
422
  shutil.copy2(
422
- self.project_dir / "cursorflow-config.json",
423
+ config_file,
423
424
  backup_path.with_suffix('.config.json')
424
425
  )
425
426
 
@@ -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.4"
7
+ version = "2.1.6"
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