cursorflow 2.2.3__py3-none-any.whl → 2.2.5__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.
cursorflow/__init__.py CHANGED
@@ -56,7 +56,7 @@ def _get_version():
56
56
  pass
57
57
 
58
58
  # Fallback version - should match pyproject.toml
59
- return "2.2.3"
59
+ return "2.2.5"
60
60
 
61
61
  __version__ = _get_version()
62
62
  __author__ = "GeekWarrior Development"
cursorflow/cli.py CHANGED
@@ -913,6 +913,120 @@ def timeline(session):
913
913
  except Exception as e:
914
914
  console.print(f"[red]❌ Failed to load timeline: {e}[/red]")
915
915
 
916
+ @main.command()
917
+ @click.option('--artifacts', is_flag=True, help='Clean all artifacts (screenshots, traces)')
918
+ @click.option('--sessions', is_flag=True, help='Clean all saved sessions')
919
+ @click.option('--old-only', is_flag=True, help='Only clean artifacts older than 7 days')
920
+ @click.option('--all', 'clean_all', is_flag=True, help='Clean everything (artifacts, sessions, results)')
921
+ @click.option('--dry-run', is_flag=True, help='Show what would be deleted without deleting')
922
+ @click.option('--yes', '-y', is_flag=True, help='Skip confirmation prompt (for automation)')
923
+ def cleanup(artifacts, sessions, old_only, clean_all, dry_run, yes):
924
+ """
925
+ Clean up CursorFlow artifacts and data
926
+
927
+ Examples:
928
+ cursorflow cleanup --artifacts # Clean screenshots and traces
929
+ cursorflow cleanup --sessions # Clean saved sessions
930
+ cursorflow cleanup --all # Clean everything
931
+ cursorflow cleanup --old-only --artifacts # Clean old artifacts only
932
+ cursorflow cleanup --dry-run --all # Preview what would be deleted
933
+ """
934
+ import shutil
935
+ from datetime import datetime, timedelta
936
+
937
+ cursorflow_dir = Path('.cursorflow')
938
+
939
+ if not cursorflow_dir.exists():
940
+ console.print("[yellow]⚠️ No .cursorflow directory found[/yellow]")
941
+ return
942
+
943
+ total_size = 0
944
+ items_to_delete = []
945
+
946
+ # Calculate cutoff time for old-only mode
947
+ cutoff_time = datetime.now() - timedelta(days=7) if old_only else None
948
+
949
+ # Artifacts cleanup
950
+ if artifacts or clean_all:
951
+ artifacts_dir = cursorflow_dir / 'artifacts'
952
+ if artifacts_dir.exists():
953
+ for item in artifacts_dir.rglob('*'):
954
+ if item.is_file():
955
+ # Check age if old-only mode
956
+ if old_only:
957
+ file_time = datetime.fromtimestamp(item.stat().st_mtime)
958
+ if file_time > cutoff_time:
959
+ continue
960
+
961
+ size = item.stat().st_size
962
+ total_size += size
963
+ items_to_delete.append(('artifact', item, size))
964
+
965
+ # Sessions cleanup
966
+ if sessions or clean_all:
967
+ sessions_dir = cursorflow_dir / 'sessions'
968
+ if sessions_dir.exists():
969
+ for session_dir in sessions_dir.iterdir():
970
+ if session_dir.is_dir():
971
+ # Calculate session size
972
+ session_size = sum(f.stat().st_size for f in session_dir.rglob('*') if f.is_file())
973
+ total_size += session_size
974
+ items_to_delete.append(('session', session_dir, session_size))
975
+
976
+ # Display what will be deleted
977
+ if not items_to_delete:
978
+ console.print("✨ Nothing to clean - directory is already tidy!")
979
+ return
980
+
981
+ console.print(f"\n📊 Cleanup Summary:")
982
+ console.print(f" • Items to delete: {len(items_to_delete)}")
983
+ console.print(f" • Total size: {total_size / 1024 / 1024:.2f} MB")
984
+
985
+ # Show breakdown
986
+ artifact_count = sum(1 for t, _, _ in items_to_delete if t == 'artifact')
987
+ session_count = sum(1 for t, _, _ in items_to_delete if t == 'session')
988
+
989
+ if artifact_count:
990
+ artifact_size = sum(s for t, _, s in items_to_delete if t == 'artifact')
991
+ console.print(f" • Artifacts: {artifact_count} files ({artifact_size / 1024 / 1024:.2f} MB)")
992
+ if session_count:
993
+ session_size = sum(s for t, _, s in items_to_delete if t == 'session')
994
+ console.print(f" • Sessions: {session_count} sessions ({session_size / 1024 / 1024:.2f} MB)")
995
+
996
+ if dry_run:
997
+ console.print("\n🔍 Dry run - nothing deleted")
998
+ console.print(" Run without --dry-run to actually delete")
999
+ return
1000
+
1001
+ # Confirm deletion (skip if --yes flag or non-interactive)
1002
+ import sys
1003
+ if not yes and sys.stdin.isatty():
1004
+ response = input("\n❓ Proceed with cleanup? [y/N]: ").strip().lower()
1005
+ if response != 'y':
1006
+ console.print("❌ Cleanup cancelled")
1007
+ return
1008
+ elif not yes and not sys.stdin.isatty():
1009
+ # Non-interactive but no --yes flag
1010
+ console.print("[yellow]⚠️ Non-interactive mode detected but no --yes flag[/yellow]")
1011
+ console.print("Add --yes to cleanup command for autonomous operation")
1012
+ return
1013
+
1014
+ # Delete items
1015
+ deleted_count = 0
1016
+ for item_type, item_path, _ in items_to_delete:
1017
+ try:
1018
+ if item_path.is_dir():
1019
+ shutil.rmtree(item_path)
1020
+ else:
1021
+ item_path.unlink()
1022
+ deleted_count += 1
1023
+ except Exception as e:
1024
+ console.print(f"[red]⚠️ Failed to delete {item_path}: {e}[/red]")
1025
+
1026
+ console.print(f"\n✅ Cleanup complete!")
1027
+ console.print(f" • Deleted {deleted_count}/{len(items_to_delete)} items")
1028
+ console.print(f" • Freed {total_size / 1024 / 1024:.2f} MB")
1029
+
916
1030
  @main.command()
917
1031
  @click.argument('project_path')
918
1032
  # Framework detection removed - CursorFlow is framework-agnostic
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.2.3
3
+ Version: 2.2.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
@@ -119,6 +119,31 @@ cursorflow test --actions '[
119
119
 
120
120
  ---
121
121
 
122
+ ## 🧹 Artifact Management
123
+
124
+ CursorFlow generates valuable debugging data (screenshots, traces, sessions). Manage disk space:
125
+
126
+ ```bash
127
+ # Clean old artifacts (>7 days)
128
+ cursorflow cleanup --artifacts --old-only
129
+
130
+ # Clean all artifacts
131
+ cursorflow cleanup --artifacts
132
+
133
+ # Clean saved sessions
134
+ cursorflow cleanup --sessions
135
+
136
+ # Clean everything
137
+ cursorflow cleanup --all
138
+
139
+ # Preview before deleting
140
+ cursorflow cleanup --all --dry-run
141
+ ```
142
+
143
+ **See:** [Artifact Cleanup Guide](docs/user/ARTIFACT_CLEANUP_GUIDE.md)
144
+
145
+ ---
146
+
122
147
  ## 🚀 Complete Page Intelligence
123
148
 
124
149
  Every test captures everything needed for debugging:
@@ -1,7 +1,7 @@
1
- cursorflow/__init__.py,sha256=x8fOUcON6ZcxoWYy_Yut_iNdcNLasE3Kb2sanysnmMk,2763
1
+ cursorflow/__init__.py,sha256=oM_cHtshPNDQ881zI8Z96rpIpWLCe5p6zuJK8N75VcA,2763
2
2
  cursorflow/auto_init.py,sha256=dXQaXXiXe4wkUP-jd8fcJ5fYVt7ASdTb47b7SzXymOM,6122
3
3
  cursorflow/auto_updater.py,sha256=oQ12TIMZ6Cm3HF-x9iRWFtvOLkRh-JWPqitS69-4roE,7851
4
- cursorflow/cli.py,sha256=2e1582m3QBqNlrfEDYN2_7UETWxxJZHU8XXGQS0q9Rw,45348
4
+ cursorflow/cli.py,sha256=t3acnfJSdc4tWCzraioR-JDMgxU19IZ3pY6IZvB7e18,50329
5
5
  cursorflow/install_cursorflow_rules.py,sha256=DsZ0680y9JMuTKFXjdgYtOKIEAjBMsdwL8LmA9WEb5A,11864
6
6
  cursorflow/post_install.py,sha256=WieBiKWG0qBAQpF8iMVWUyb9Fr2Xky9qECTMPrlAbpE,2678
7
7
  cursorflow/updater.py,sha256=SroSQHQi5cYyzcOK_bf-WzmQmE7yeOs8qo3r__j-Z6E,19583
@@ -30,9 +30,9 @@ cursorflow/log_sources/ssh_remote.py,sha256=kZRpLpiO7cLd67wlCiTvz4Prwx1_Vu3ytB5K
30
30
  cursorflow/rules/__init__.py,sha256=gPcA-IkhXj03sl7cvZV0wwo7CtEkcyuKs4y0F5oQbqE,458
31
31
  cursorflow/rules/cursorflow-installation.mdc,sha256=D55pzzDPAVVbE3gAtKPUGoT-2fvB-FI2l6yrTdzUIEo,10208
32
32
  cursorflow/rules/cursorflow-usage.mdc,sha256=hCbA9koCtRoeLOkB-PXmLlGzsag_15RuOveOE_R4JZ0,21628
33
- cursorflow-2.2.3.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
34
- cursorflow-2.2.3.dist-info/METADATA,sha256=N7WonXzbDp99DIxqDLQTbxc_iITk2GlSPb2XhOjXfH4,14014
35
- cursorflow-2.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
- cursorflow-2.2.3.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
37
- cursorflow-2.2.3.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
38
- cursorflow-2.2.3.dist-info/RECORD,,
33
+ cursorflow-2.2.5.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
34
+ cursorflow-2.2.5.dist-info/METADATA,sha256=a3FTj3fVs3k0pGEwfbKUo_MhWHYi8l9osy5oQc2W7mE,14520
35
+ cursorflow-2.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ cursorflow-2.2.5.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
37
+ cursorflow-2.2.5.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
38
+ cursorflow-2.2.5.dist-info/RECORD,,