clonebox 0.1.22__tar.gz → 0.1.24__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 (30) hide show
  1. {clonebox-0.1.22/src/clonebox.egg-info → clonebox-0.1.24}/PKG-INFO +123 -5
  2. {clonebox-0.1.22 → clonebox-0.1.24}/README.md +121 -4
  3. {clonebox-0.1.22 → clonebox-0.1.24}/pyproject.toml +2 -1
  4. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/cloner.py +841 -31
  5. {clonebox-0.1.22 → clonebox-0.1.24/src/clonebox.egg-info}/PKG-INFO +123 -5
  6. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox.egg-info/requires.txt +1 -0
  7. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_cloner.py +11 -5
  8. {clonebox-0.1.22 → clonebox-0.1.24}/LICENSE +0 -0
  9. {clonebox-0.1.22 → clonebox-0.1.24}/setup.cfg +0 -0
  10. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/__init__.py +0 -0
  11. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/__main__.py +0 -0
  12. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/cli.py +0 -0
  13. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/container.py +0 -0
  14. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/dashboard.py +0 -0
  15. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/detector.py +0 -0
  16. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/models.py +0 -0
  17. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/profiles.py +0 -0
  18. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/templates/profiles/ml-dev.yaml +0 -0
  19. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox/validator.py +0 -0
  20. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox.egg-info/SOURCES.txt +0 -0
  21. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox.egg-info/dependency_links.txt +0 -0
  22. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox.egg-info/entry_points.txt +0 -0
  23. {clonebox-0.1.22 → clonebox-0.1.24}/src/clonebox.egg-info/top_level.txt +0 -0
  24. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_cli.py +0 -0
  25. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_container.py +0 -0
  26. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_detector.py +0 -0
  27. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_models.py +0 -0
  28. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_network.py +0 -0
  29. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_profiles.py +0 -0
  30. {clonebox-0.1.22 → clonebox-0.1.24}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clonebox
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary: Clone your workstation environment to an isolated VM with selective apps, paths and services
5
5
  Author: CloneBox Team
6
6
  License: Apache-2.0
@@ -31,6 +31,7 @@ Requires-Dist: questionary>=2.0.0
31
31
  Requires-Dist: psutil>=5.9.0
32
32
  Requires-Dist: pyyaml>=6.0
33
33
  Requires-Dist: pydantic>=2.0.0
34
+ Requires-Dist: python-dotenv>=1.0.0
34
35
  Provides-Extra: dev
35
36
  Requires-Dist: pytest>=7.0.0; extra == "dev"
36
37
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
@@ -81,6 +82,9 @@ CloneBox lets you create isolated virtual machines with only the applications, d
81
82
  - ⚡ **Fast creation** - No full disk cloning, VMs are ready in seconds
82
83
  - 📥 **Auto-download** - Automatically downloads and caches Ubuntu cloud images (stored in ~/Downloads)
83
84
  - 📊 **Health monitoring** - Built-in health checks for packages, services, and mounts
85
+ - 🔄 **Self-healing** - Automatic monitoring and repair of apps and services
86
+ - 📈 **Live monitoring** - Real-time dashboard for running applications and services
87
+ - 🔧 **Repair tools** - One-click fix for common VM issues (audio, permissions, mounts)
84
88
  - 🔄 **VM migration** - Export/import VMs with data between workstations
85
89
  - 🧪 **Configuration testing** - Validate VM settings and functionality
86
90
  - 📁 **App data sync** - Include browser profiles, IDE settings, and app configs
@@ -96,10 +100,12 @@ CloneBox excels in scenarios where developers need:
96
100
  ## What's Next
97
101
 
98
102
  Project roadmap includes:
99
- - Container runtime integration (Podman/Docker lightweight mode)
100
- - Local dashboard for VM and container management
101
- - Profile system for reusable configuration presets
102
- - Proxmox export capabilities for production migration
103
+ - **v0.2.0**: `clonebox exec` command, VM snapshots, web dashboard MVP
104
+ - **v0.3.0**: Container runtime integration (Podman/Docker), multi-VM orchestration
105
+ - **v0.4.0**: Cloud provider support (AWS, GCP, Azure), Windows WSL2 support
106
+ - **v1.0.0**: Production-ready with full monitoring, backup/restore, enterprise features
107
+
108
+ See [TODO.md](TODO.md) for detailed roadmap and [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
103
109
 
104
110
 
105
111
 
@@ -111,6 +117,8 @@ Kluczowe komendy:
111
117
  - `clonebox` – interaktywny wizard (detect + create + start)
112
118
  - `clonebox detect` – skanuje usługi/apps/ścieżki
113
119
  - `clonebox clone . --user --run` – szybki klon bieżącego katalogu z użytkownikiem i autostartem
120
+ - `clonebox watch . --user` – monitoruj na żywo aplikacje i usługi w VM
121
+ - `clonebox repair . --user` – napraw problemy z uprawnieniami, audio, usługami
114
122
  - `clonebox container up|ps|stop|rm` – lekki runtime kontenerowy (podman/docker)
115
123
  - `clonebox dashboard` – lokalny dashboard (VM + containers)
116
124
 
@@ -496,6 +504,111 @@ clonebox status . --user --health
496
504
  # Or rebuild: clonebox clone . --user --run --replace
497
505
  ```
498
506
 
507
+ ## 📊 Monitoring and Self-Healing
508
+
509
+ CloneBox includes continuous monitoring and automatic self-healing capabilities for both GUI applications and system services.
510
+
511
+ ### Monitor Running Applications and Services
512
+
513
+ ```bash
514
+ # Watch real-time status of apps and services
515
+ clonebox watch . --user
516
+
517
+ # Output shows live dashboard:
518
+ # ╔══════════════════════════════════════════════════════════╗
519
+ # ║ CloneBox Live Monitor ║
520
+ # ╠══════════════════════════════════════════════════════════╣
521
+ # ║ 🖥️ GUI Apps: ║
522
+ # ║ ✅ pycharm-community PID: 1234 Memory: 512MB ║
523
+ # ║ ✅ firefox PID: 5678 Memory: 256MB ║
524
+ # ║ ❌ chromium Not running ║
525
+ # ║ ║
526
+ # ║ 🔧 System Services: ║
527
+ # ║ ✅ docker Active: 2h 15m ║
528
+ # ║ ✅ nginx Active: 1h 30m ║
529
+ # ║ ✅ uvicorn Active: 45m (port 8000) ║
530
+ # ║ ║
531
+ # ║ 📊 Last check: 2024-01-31 13:25:30 ║
532
+ # ║ 🔄 Next check in: 25 seconds ║
533
+ # ╚══════════════════════════════════════════════════════════╝
534
+
535
+ # Check detailed status with logs
536
+ clonebox status . --user --verbose
537
+
538
+ # View monitor logs from host
539
+ ./scripts/clonebox-logs.sh # Interactive log viewer
540
+ # Or via SSH:
541
+ ssh ubuntu@<IP_VM> "tail -f /var/log/clonebox-monitor.log"
542
+ ```
543
+
544
+ ### Repair and Troubleshooting
545
+
546
+ ```bash
547
+ # Run automatic repair from host
548
+ clonebox repair . --user
549
+
550
+ # This triggers the repair script inside VM which:
551
+ # - Fixes directory permissions (pulse, ibus, dconf)
552
+ # - Restarts audio services (PulseAudio/PipeWire)
553
+ # - Reconnects snap interfaces
554
+ # - Remounts missing filesystems
555
+ # - Resets GNOME keyring if needed
556
+
557
+ # Interactive repair menu (via SSH)
558
+ ssh ubuntu@<IP_VM> "clonebox-repair"
559
+
560
+ # Manual repair options from host:
561
+ clonebox repair . --user --auto # Full automatic repair
562
+ clonebox repair . --user --perms # Fix permissions only
563
+ clonebox repair . --user --audio # Fix audio only
564
+ clonebox repair . --user --snaps # Reconnect snaps only
565
+ clonebox repair . --user --mounts # Remount filesystems only
566
+
567
+ # Check repair status (via SSH)
568
+ ssh ubuntu@<IP_VM> "cat /var/run/clonebox-status"
569
+
570
+ # View repair logs
571
+ ./scripts/clonebox-logs.sh # Interactive viewer
572
+ # Or via SSH:
573
+ ssh ubuntu@<IP_VM> "tail -n 50 /var/log/clonebox-boot.log"
574
+ ```
575
+
576
+ ### Monitor Configuration
577
+
578
+ The monitoring system is configured through environment variables in `.env`:
579
+
580
+ ```bash
581
+ # Enable/disable monitoring
582
+ CLONEBOX_ENABLE_MONITORING=true
583
+ CLONEBOX_MONITOR_INTERVAL=30 # Check every 30 seconds
584
+ CLONEBOX_AUTO_REPAIR=true # Auto-restart failed services
585
+ CLONEBOX_WATCH_APPS=true # Monitor GUI apps
586
+ CLONEBOX_WATCH_SERVICES=true # Monitor system services
587
+ ```
588
+
589
+ ### Inside the VM - Manual Controls
590
+
591
+ ```bash
592
+ # Check monitor service status
593
+ systemctl --user status clonebox-monitor
594
+
595
+ # View monitor logs
596
+ journalctl --user -u clonebox-monitor -f
597
+ tail -f /var/log/clonebox-monitor.log
598
+
599
+ # Stop/start monitoring
600
+ systemctl --user stop clonebox-monitor
601
+ systemctl --user start clonebox-monitor
602
+
603
+ # Check last status
604
+ cat /var/run/clonebox-monitor-status
605
+
606
+ # Run repair manually
607
+ clonebox-repair --all # Run all fixes
608
+ clonebox-repair --status # Show current status
609
+ clonebox-repair --logs # Show recent logs
610
+ ```
611
+
499
612
  ### Export/Import Workflow
500
613
 
501
614
  ```bash
@@ -536,6 +649,11 @@ virt-viewer --connect qemu:///session clone-clonebox
536
649
  # Check VM details:
537
650
  clonebox list # List all VMs
538
651
  virsh --connect qemu:///session dominfo clone-clonebox
652
+
653
+ # Restart VM if needed:
654
+ clonebox stop . --user && clonebox start . --user # Soft reboot
655
+ virsh --connect qemu:///session reboot clone-clonebox # Direct reboot
656
+ virsh --connect qemu:///session reset clone-clonebox # Hard reset if frozen
539
657
  ```
540
658
 
541
659
  ## Legacy Examples (Manual Config)
@@ -33,6 +33,9 @@ CloneBox lets you create isolated virtual machines with only the applications, d
33
33
  - ⚡ **Fast creation** - No full disk cloning, VMs are ready in seconds
34
34
  - 📥 **Auto-download** - Automatically downloads and caches Ubuntu cloud images (stored in ~/Downloads)
35
35
  - 📊 **Health monitoring** - Built-in health checks for packages, services, and mounts
36
+ - 🔄 **Self-healing** - Automatic monitoring and repair of apps and services
37
+ - 📈 **Live monitoring** - Real-time dashboard for running applications and services
38
+ - 🔧 **Repair tools** - One-click fix for common VM issues (audio, permissions, mounts)
36
39
  - 🔄 **VM migration** - Export/import VMs with data between workstations
37
40
  - 🧪 **Configuration testing** - Validate VM settings and functionality
38
41
  - 📁 **App data sync** - Include browser profiles, IDE settings, and app configs
@@ -48,10 +51,12 @@ CloneBox excels in scenarios where developers need:
48
51
  ## What's Next
49
52
 
50
53
  Project roadmap includes:
51
- - Container runtime integration (Podman/Docker lightweight mode)
52
- - Local dashboard for VM and container management
53
- - Profile system for reusable configuration presets
54
- - Proxmox export capabilities for production migration
54
+ - **v0.2.0**: `clonebox exec` command, VM snapshots, web dashboard MVP
55
+ - **v0.3.0**: Container runtime integration (Podman/Docker), multi-VM orchestration
56
+ - **v0.4.0**: Cloud provider support (AWS, GCP, Azure), Windows WSL2 support
57
+ - **v1.0.0**: Production-ready with full monitoring, backup/restore, enterprise features
58
+
59
+ See [TODO.md](TODO.md) for detailed roadmap and [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
55
60
 
56
61
 
57
62
 
@@ -63,6 +68,8 @@ Kluczowe komendy:
63
68
  - `clonebox` – interaktywny wizard (detect + create + start)
64
69
  - `clonebox detect` – skanuje usługi/apps/ścieżki
65
70
  - `clonebox clone . --user --run` – szybki klon bieżącego katalogu z użytkownikiem i autostartem
71
+ - `clonebox watch . --user` – monitoruj na żywo aplikacje i usługi w VM
72
+ - `clonebox repair . --user` – napraw problemy z uprawnieniami, audio, usługami
66
73
  - `clonebox container up|ps|stop|rm` – lekki runtime kontenerowy (podman/docker)
67
74
  - `clonebox dashboard` – lokalny dashboard (VM + containers)
68
75
 
@@ -448,6 +455,111 @@ clonebox status . --user --health
448
455
  # Or rebuild: clonebox clone . --user --run --replace
449
456
  ```
450
457
 
458
+ ## 📊 Monitoring and Self-Healing
459
+
460
+ CloneBox includes continuous monitoring and automatic self-healing capabilities for both GUI applications and system services.
461
+
462
+ ### Monitor Running Applications and Services
463
+
464
+ ```bash
465
+ # Watch real-time status of apps and services
466
+ clonebox watch . --user
467
+
468
+ # Output shows live dashboard:
469
+ # ╔══════════════════════════════════════════════════════════╗
470
+ # ║ CloneBox Live Monitor ║
471
+ # ╠══════════════════════════════════════════════════════════╣
472
+ # ║ 🖥️ GUI Apps: ║
473
+ # ║ ✅ pycharm-community PID: 1234 Memory: 512MB ║
474
+ # ║ ✅ firefox PID: 5678 Memory: 256MB ║
475
+ # ║ ❌ chromium Not running ║
476
+ # ║ ║
477
+ # ║ 🔧 System Services: ║
478
+ # ║ ✅ docker Active: 2h 15m ║
479
+ # ║ ✅ nginx Active: 1h 30m ║
480
+ # ║ ✅ uvicorn Active: 45m (port 8000) ║
481
+ # ║ ║
482
+ # ║ 📊 Last check: 2024-01-31 13:25:30 ║
483
+ # ║ 🔄 Next check in: 25 seconds ║
484
+ # ╚══════════════════════════════════════════════════════════╝
485
+
486
+ # Check detailed status with logs
487
+ clonebox status . --user --verbose
488
+
489
+ # View monitor logs from host
490
+ ./scripts/clonebox-logs.sh # Interactive log viewer
491
+ # Or via SSH:
492
+ ssh ubuntu@<IP_VM> "tail -f /var/log/clonebox-monitor.log"
493
+ ```
494
+
495
+ ### Repair and Troubleshooting
496
+
497
+ ```bash
498
+ # Run automatic repair from host
499
+ clonebox repair . --user
500
+
501
+ # This triggers the repair script inside VM which:
502
+ # - Fixes directory permissions (pulse, ibus, dconf)
503
+ # - Restarts audio services (PulseAudio/PipeWire)
504
+ # - Reconnects snap interfaces
505
+ # - Remounts missing filesystems
506
+ # - Resets GNOME keyring if needed
507
+
508
+ # Interactive repair menu (via SSH)
509
+ ssh ubuntu@<IP_VM> "clonebox-repair"
510
+
511
+ # Manual repair options from host:
512
+ clonebox repair . --user --auto # Full automatic repair
513
+ clonebox repair . --user --perms # Fix permissions only
514
+ clonebox repair . --user --audio # Fix audio only
515
+ clonebox repair . --user --snaps # Reconnect snaps only
516
+ clonebox repair . --user --mounts # Remount filesystems only
517
+
518
+ # Check repair status (via SSH)
519
+ ssh ubuntu@<IP_VM> "cat /var/run/clonebox-status"
520
+
521
+ # View repair logs
522
+ ./scripts/clonebox-logs.sh # Interactive viewer
523
+ # Or via SSH:
524
+ ssh ubuntu@<IP_VM> "tail -n 50 /var/log/clonebox-boot.log"
525
+ ```
526
+
527
+ ### Monitor Configuration
528
+
529
+ The monitoring system is configured through environment variables in `.env`:
530
+
531
+ ```bash
532
+ # Enable/disable monitoring
533
+ CLONEBOX_ENABLE_MONITORING=true
534
+ CLONEBOX_MONITOR_INTERVAL=30 # Check every 30 seconds
535
+ CLONEBOX_AUTO_REPAIR=true # Auto-restart failed services
536
+ CLONEBOX_WATCH_APPS=true # Monitor GUI apps
537
+ CLONEBOX_WATCH_SERVICES=true # Monitor system services
538
+ ```
539
+
540
+ ### Inside the VM - Manual Controls
541
+
542
+ ```bash
543
+ # Check monitor service status
544
+ systemctl --user status clonebox-monitor
545
+
546
+ # View monitor logs
547
+ journalctl --user -u clonebox-monitor -f
548
+ tail -f /var/log/clonebox-monitor.log
549
+
550
+ # Stop/start monitoring
551
+ systemctl --user stop clonebox-monitor
552
+ systemctl --user start clonebox-monitor
553
+
554
+ # Check last status
555
+ cat /var/run/clonebox-monitor-status
556
+
557
+ # Run repair manually
558
+ clonebox-repair --all # Run all fixes
559
+ clonebox-repair --status # Show current status
560
+ clonebox-repair --logs # Show recent logs
561
+ ```
562
+
451
563
  ### Export/Import Workflow
452
564
 
453
565
  ```bash
@@ -488,6 +600,11 @@ virt-viewer --connect qemu:///session clone-clonebox
488
600
  # Check VM details:
489
601
  clonebox list # List all VMs
490
602
  virsh --connect qemu:///session dominfo clone-clonebox
603
+
604
+ # Restart VM if needed:
605
+ clonebox stop . --user && clonebox start . --user # Soft reboot
606
+ virsh --connect qemu:///session reboot clone-clonebox # Direct reboot
607
+ virsh --connect qemu:///session reset clone-clonebox # Hard reset if frozen
491
608
  ```
492
609
 
493
610
  ## Legacy Examples (Manual Config)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "clonebox"
7
- version = "0.1.22"
7
+ version = "0.1.24"
8
8
  description = "Clone your workstation environment to an isolated VM with selective apps, paths and services"
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}
@@ -37,6 +37,7 @@ dependencies = [
37
37
  "psutil>=5.9.0",
38
38
  "pyyaml>=6.0",
39
39
  "pydantic>=2.0.0",
40
+ "python-dotenv>=1.0.0",
40
41
  ]
41
42
 
42
43
  [project.optional-dependencies]